@@ -20,7 +20,13 @@ router.post('/login', function(req, res, next) {
} = params;
console.log(username);
Users.login({username, password}).
- then((user) => res.send(user)).
+ then((user) => {
+ let {
+ username,
+ token
+ } = user;
+ res.send({username, token});
+ }).
catch((e) => {
console.log(e);
res.status(400);