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

View File

@ -15,8 +15,8 @@ module.exports = {
user: 'api@atlanticbiomedical.com', user: 'api@atlanticbiomedical.com',
password: 'success4', password: 'success4',
partsRequest: 'akirayasha@gmail.com', partsRequest: 'parts@atlanticbiomedical.com',
exception: 'akirayasha@gmail.com' exception: 'hr@atlanticbiomedical.com'
}, },
mysql: { mysql: {
host: 'localhost', host: 'localhost',

View File

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh
NODE_ENV='prod' node/bin/node launcher.js >> server.log NODE_ENV='prod' node launcher.js >> server.log