Update deprecated 'res' sending
parent
88346db70e
commit
8dd1abff55
|
@ -78,10 +78,10 @@ authenticate.route('/signup')
|
|||
.post((req, res, next) => {
|
||||
create(req.body)
|
||||
.then(() => {
|
||||
res.send(201, {message: 'User successfully created'});
|
||||
res.status(codes.created).send({message: 'User successfully created'});
|
||||
})
|
||||
.catch((err) => {
|
||||
res.status(400).send(err);
|
||||
res.status(codes.wrongrequest).send(err);
|
||||
});
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue