( bad ) lil error message on failed login

This commit is contained in:
Madeline
2022-06-27 16:40:40 +10:00
parent 83ed84c4de
commit 845d932e83
2 changed files with 15 additions and 3 deletions
+1 -2
View File
@@ -71,9 +71,8 @@ const handlers: { [key: string]: any; } = {
app.get("/oauth/:type", async (req, res) => {
const { type } = req.params;
if (!type) return res.sendStatus(400);
const handler = handlers[type];
if (!handler) return res.sendStatus(400);
if (!type || !handler) return res.sendStatus(400);
const data = await handler.getAccessToken(req, res);
if (!data) return res.sendStatus(500);