Auth login json response
This commit is contained in:
parent
73964ac387
commit
666928b1a9
|
@ -44,11 +44,11 @@ module.exports = function(app) {
|
|||
if (!loginUrl)
|
||||
loginUrl = applications.default;
|
||||
|
||||
res.send(JSON.stringify({
|
||||
res.json({
|
||||
token: token.id,
|
||||
continue: query.continue,
|
||||
loginUrl: loginUrl
|
||||
}));
|
||||
});
|
||||
}
|
||||
function findCb(err, instance) {
|
||||
if (!instance || instance.password !== md5(password)) {
|
||||
|
@ -69,9 +69,9 @@ module.exports = function(app) {
|
|||
}
|
||||
function badLogin() {
|
||||
res.status(401);
|
||||
res.send(JSON.stringify({
|
||||
res.json({
|
||||
message: 'Login failed'
|
||||
}));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue