rework how oauth routes work

This commit is contained in:
Lewis Crichton
2023-03-03 15:50:30 +00:00
parent 6a3dcce28a
commit 577254f7d5
+8 -1
View File
@@ -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 {