Fixed task update not working
This commit is contained in:
parent
d05ef0f37c
commit
263374985b
2 changed files with 5 additions and 5 deletions
|
@ -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
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue