mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 12:21:36 +03:00
parent
ce57b46358
commit
750c19014a
@ -171,12 +171,13 @@ adminControllers = {
|
||||
email: email,
|
||||
password: password
|
||||
}).then(function (user) {
|
||||
|
||||
if (req.session.user === undefined) {
|
||||
req.session.user = user.id;
|
||||
}
|
||||
res.json(200, {redirect: '/ghost/'});
|
||||
}, function (error) {
|
||||
api.settings.edit('email', email).then(function () {
|
||||
if (req.session.user === undefined) {
|
||||
req.session.user = user.id;
|
||||
}
|
||||
res.json(200, {redirect: '/ghost/'});
|
||||
});
|
||||
}).otherwise(function (error) {
|
||||
res.json(401, {error: error.message});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user