This commit is contained in:
Dobie Wollert
2015-12-20 22:39:47 -05:00
parent 00efe9f652
commit a680042374
3 changed files with 5 additions and 3 deletions

View File

@ -424,6 +424,7 @@ function handleClockOutRequest(params, user, spans, workorders, now) {
span.status = 'closed';
span.end = now.clone().utc().toDate();
span.duration = moment(span.end).diff(span.start, 'seconds');
span.notes = params.notes;
return span.save().then(spanToResponse);
}
@ -491,6 +492,7 @@ function errorHandler(res) {
}
});
} else {
console.error(error);
console.error(error.stack);
res.json(500, 'Internal error');
}