mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Additional validation / API error consistency fix
This commit is contained in:
parent
88a6541ab6
commit
0c5bb03dcc
1 changed files with 1 additions and 2 deletions
3
index.js
3
index.js
|
@ -81,8 +81,7 @@ function cleanNotifications(req, res, next) {
|
|||
function authAPI(req, res, next) {
|
||||
if (!req.session.user) {
|
||||
// TODO: standardize error format/codes/messages
|
||||
var err = { code: 42, message: 'Please sign in' };
|
||||
res.json(401, { error: err });
|
||||
res.json(401, { error: 'Please sign in' });
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue