Fixed task update not working

This commit is contained in:
konrad 2019-06-05 19:36:32 +02:00
parent d05ef0f37c
commit 263374985b
No known key found for this signature in database
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 * @param model
* @return {*} * @return {*}
*/ */
/* beforeUpdate(model) { beforeUpdate(model) {
return model return model
}*/ }
/** /**
* Default preprocessor for delete requests * Default preprocessor for delete requests

View file

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