Skip to content

Commit

Permalink
Return "no account" error for /api/maint/places requests if account i…
Browse files Browse the repository at this point in the history
…s not specified.
  • Loading branch information
Misterblue committed Jun 13, 2021
1 parent 41fb4e3 commit 4cd620c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/routes/api/maint/places.ts
Expand Up @@ -58,6 +58,9 @@ const procPlacesUnhooked: RequestHandler = async (req: Request, resp: Response,
else {
req.vRestResp.respondFailure('not admin');
};
}
else {
req.vRestResp.respondFailure('must have account for access');
};

placer.addResponseFields(req);
Expand All @@ -83,6 +86,9 @@ const procPlacesDeleteUnhooked: RequestHandler = async (req: Request, resp: Resp
else {
req.vRestResp.respondFailure('not admin');
};
}
else {
req.vRestResp.respondFailure('must have account for access');
};

placer.addResponseFields(req);
Expand Down Expand Up @@ -124,6 +130,9 @@ const procPlacesInactive: RequestHandler = async (req: Request, resp: Response,
else {
req.vRestResp.respondFailure('not admin');
};
}
else {
req.vRestResp.respondFailure('must have account for access');
};

placer.addResponseFields(req);
Expand All @@ -149,6 +158,9 @@ const procPlacesDeleteInactive: RequestHandler = async (req: Request, resp: Resp
else {
req.vRestResp.respondFailure('not admin');
};
}
else {
req.vRestResp.respondFailure('must have account for access');
};

placer.addResponseFields(req);
Expand Down

0 comments on commit 4cd620c

Please sign in to comment.