rework how oauth routes work
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user