From 5f5f85fecf7be1b69b93111dbccd47a20cad488f Mon Sep 17 00:00:00 2001 From: Lucas Gabriel Lima <lgl15@inf.ufpr.br> Date: Tue, 27 Sep 2016 10:14:58 -0300 Subject: [PATCH] fix identation --- src/libs/routes/user.js | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/libs/routes/user.js b/src/libs/routes/user.js index 629ec095..a202436a 100644 --- a/src/libs/routes/user.js +++ b/src/libs/routes/user.js @@ -10,22 +10,22 @@ const User = require('../models/user'); userApp.post('/', (req, res) => { - if (!req.body.email || !req.body.password) { - res.json({success: false, msg: 'Please pass email and password.'}); - } else { - var newUser = new User({ - email: req.body.email, - password: req.body.password - }); - log.debug(newUser.email); - // save the user - newUser.save((err) => { - if (err) { - return res.json({success: false, msg: 'Email already in use.'}); - } - res.json({success: true, msg: 'Successful created new user.'}); - }); - } + if (!req.body.email || !req.body.password) { + res.json({success: false, msg: 'Please pass email and password.'}); + } else { + var newUser = new User({ + email: req.body.email, + password: req.body.password + }); + log.debug(newUser.email); + // save the user + newUser.save((err) => { + if (err) { + return res.json({success: false, msg: 'Email already in use.'}); + } + res.json({success: true, msg: 'Successful created new user.'}); + }); + } }); module.exports = userApp; -- GitLab