Fix for task dates update (#23)

This commit is contained in:
konrad 2019-03-03 21:07:15 +00:00 committed by Gitea
parent 78abd2e88f
commit 6603c046bc

View file

@ -207,9 +207,9 @@ export default class AbstractService {
* @param model * @param model
* @return {*} * @return {*}
*/ */
beforeUpdate(model) { /* beforeUpdate(model) {
return model return model
} }*/
/** /**
* Default preprocessor for delete requests * Default preprocessor for delete requests
@ -315,7 +315,9 @@ export default class AbstractService {
} }
const cancel = this.setLoading() const cancel = this.setLoading()
model = this.beforeUpdate(model) if(typeof this.beforeUpdate === 'function') {
model = this.beforeUpdate(model)
}
return this.http.post(this.getReplacedRoute(this.paths.update, model), model) return this.http.post(this.getReplacedRoute(this.paths.update, model), model)
.catch(error => { .catch(error => {
return this.errorHandler(error) return this.errorHandler(error)