From 8dd1abff55f407e1064c19c17881180386332359 Mon Sep 17 00:00:00 2001 From: HardiReady Date: Sun, 22 Jul 2018 18:21:19 +0200 Subject: [PATCH] Update deprecated 'res' sending --- api/routes/authenticate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/routes/authenticate.js b/api/routes/authenticate.js index f43a338..dcf64b1 100644 --- a/api/routes/authenticate.js +++ b/api/routes/authenticate.js @@ -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); }); })