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) { config.isAuthorized(fingerprint, function (err, device) {
if (err) { if (err) {
var serverError = new Error('Internal Server Error'); res.json({err: 'Internal Server Error'});
serverError.status = 500; return next(err);
return next(serverError);
} }
if (!device) { if (!device) {
var pairError = new Error('Not Found'); res.statusCode = 404;
pairError.status = 404; res.json({err: 'Not Found'});
return next(pairError); return next(new Error('Device is unpaired'));
} }
next(); next();
}); });

View file

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