Update deprecated 'res' sending

pull/43/head
HardiReady 2018-07-22 18:21:19 +02:00
parent 88346db70e
commit 8dd1abff55
1 changed files with 2 additions and 2 deletions

View File

@ -78,10 +78,10 @@ authenticate.route('/signup')
.post((req, res, next) => { .post((req, res, next) => {
create(req.body) create(req.body)
.then(() => { .then(() => {
res.send(201, {message: 'User successfully created'}); res.status(codes.created).send({message: 'User successfully created'});
}) })
.catch((err) => { .catch((err) => {
res.status(400).send(err); res.status(codes.wrongrequest).send(err);
}); });
}) })