mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Merge pull request #1108 from nason/signupErrorHandler
Add otherwise error callback to redirectToSignup promise. Fixes #1071
This commit is contained in:
commit
9b879f6edb
1 changed files with 3 additions and 2 deletions
|
@ -74,9 +74,10 @@ function redirectToSignup(req, res, next) {
|
||||||
if (users.length === 0) {
|
if (users.length === 0) {
|
||||||
return res.redirect('/ghost/signup/');
|
return res.redirect('/ghost/signup/');
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
next();
|
next();
|
||||||
|
}).otherwise(function (err) {
|
||||||
|
return next(new Error(err));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// While we're here, let's clean up on aisle 5
|
// While we're here, let's clean up on aisle 5
|
||||||
|
|
Loading…
Add table
Reference in a new issue