From 577254f7d543c2f27f128cc202bd1a8f7fba02f6 Mon Sep 17 00:00:00 2001 From: Lewis Crichton Date: Fri, 3 Mar 2023 15:50:30 +0000 Subject: [PATCH] rework how oauth routes work --- main.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 5d89719..176249b 100644 --- a/main.go +++ b/main.go @@ -193,7 +193,7 @@ func main() { // #endregion // #region discord oauth - app.Get("/callback", func(c *fiber.Ctx) error { + app.Get("/oauth/callback", func(c *fiber.Ctx) error { code := c.Query("code") if code == "" { @@ -267,6 +267,13 @@ func main() { "secret": secret, }) }) + + app.Get("/oauth/settings", func(c *fiber.Ctx) error { + return c.JSON(&fiber.Map{ + "clientId": DISCORD_CLIENT_ID, + "redirectUri": DISCORD_REDIRECT_URI + }) + }) // #endregion app.Get("/", func(c *fiber.Ctx) error {