Merge branch 'production' into merge-logging
This commit is contained in:
commit
bd96bb3caf
2 changed files with 6 additions and 7 deletions
11
lib/app.js
11
lib/app.js
|
|
@ -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();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue