simple api log

This commit is contained in:
Andris Reinman 2017-12-22 17:49:47 +02:00
parent 4505ed0c92
commit 3d8122fa4a
2 changed files with 2 additions and 0 deletions

1
api.js
View file

@ -60,6 +60,7 @@ server.use((req, res, next) => {
if (req.route.path === '/users/:user/updates') {
req.headers['accept-encoding'] = '';
}
log.http(req.method, req.url);
next();
});
server.use(restify.plugins.gzipResponse());

View file

@ -320,6 +320,7 @@ module.exports = (db, server) => {
});
return next();
}
if (addressData) {
res.json({
error: 'This email address already exists'