From 845d932e83b65b1807029e9a1408da1b73baf355 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Mon, 27 Jun 2022 16:40:40 +1000 Subject: ( bad ) lil error message on failed login --- slowcord/public/login.html | 15 ++++++++++++++- slowcord/src/index.ts | 3 +-- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'slowcord') diff --git a/slowcord/public/login.html b/slowcord/public/login.html index 2325f396..e53dfde9 100644 --- a/slowcord/public/login.html +++ b/slowcord/public/login.html @@ -89,6 +89,13 @@ #loginDiscord { background-color: var(--background-login-discord); } + + #failure { + width: 100%; + margin-top: 10px; + color: rgb(200, 20, 20); + display: none; + } @@ -98,8 +105,11 @@

Welcome to Slowcord

Glad to see you <3

+ +

Login failed

+
@@ -107,7 +117,7 @@ - + diff --git a/slowcord/src/index.ts b/slowcord/src/index.ts index e4ad3917..e22acaf3 100644 --- a/slowcord/src/index.ts +++ b/slowcord/src/index.ts @@ -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); -- cgit 1.4.1