Merge branch 'production' into merge-logging

This commit is contained in:
Josh Harvey 2014-05-03 16:28:25 -04:00
commit bd96bb3caf
2 changed files with 6 additions and 7 deletions

View file

@ -74,14 +74,13 @@ module.exports = function (options) {
config.isAuthorized(fingerprint, function (err, device) {
if (err) {
var serverError = new Error('Internal Server Error');
serverError.status = 500;
return next(serverError);
res.json({err: 'Internal Server Error'});
return next(err);
}
if (!device) {
var pairError = new Error('Not Found');
pairError.status = 404;
return next(pairError);
res.statusCode = 404;
res.json({err: 'Not Found'});
return next(new Error('Device is unpaired'));
}
next();
});

View file

@ -2,7 +2,7 @@
"name": "lamassu-server",
"description": "bitcoin atm client server protocol module",
"keywords": [],
"version": "0.4.5",
"version": "0.4.6",
"license": "unlicense",
"author": "Lamassu (https://lamassu.is)",
"engines": {