Fixed task update not working

This commit is contained in:
konrad 2019-06-05 19:36:32 +02:00
parent d05ef0f37c
commit 263374985b
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 5 additions and 5 deletions

View File

@ -207,9 +207,9 @@ export default class AbstractService {
* @param model
* @return {*}
*/
/* beforeUpdate(model) {
beforeUpdate(model) {
return model
}*/
}
/**
* Default preprocessor for delete requests

View File

@ -28,9 +28,9 @@ export default class TaskService extends AbstractService {
model.listID = Number(model.listID)
// Convert the date in a unix timestamp
model.dueDate = Math.round(+new Date(model.dueDate) / 1000)
model.startDate = Math.round(+new Date(model.startDate) / 1000)
model.endDate = Math.round(+new Date(model.endDate) / 1000)
model.dueDate = model.dueDate !== null ? Math.round(+new Date(model.dueDate) / 1000) : model.dueDate
model.startDate = model.startDate !== null ? Math.round(+new Date(model.startDate) / 1000): model.startDate
model.endDate = model.endDate !== null ? Math.round(+new Date(model.endDate) / 1000) : model.endDate
// remove all nulls, these would create empty reminders
for (const index in model.reminderDates) {