0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Add error handling to redirectToSignup promise

Fixes #1078
- Add an otherwise error callback to the redirectToSignup promise
This commit is contained in:
nason 2013-10-16 01:10:09 -07:00
parent a5c35d451a
commit 6a5e399997

View file

@ -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();
}).otherwise(function (err) {
return next(new Error(err));
}); });
next();
} }
// While we're here, let's clean up on aisle 5 // While we're here, let's clean up on aisle 5