rework how oauth routes work
This commit is contained in:
@@ -193,7 +193,7 @@ func main() {
|
|||||||
// #endregion
|
// #endregion
|
||||||
|
|
||||||
// #region discord oauth
|
// #region discord oauth
|
||||||
app.Get("/callback", func(c *fiber.Ctx) error {
|
app.Get("/oauth/callback", func(c *fiber.Ctx) error {
|
||||||
code := c.Query("code")
|
code := c.Query("code")
|
||||||
|
|
||||||
if code == "" {
|
if code == "" {
|
||||||
@@ -267,6 +267,13 @@ func main() {
|
|||||||
"secret": secret,
|
"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
|
// #endregion
|
||||||
|
|
||||||
app.Get("/", func(c *fiber.Ctx) error {
|
app.Get("/", func(c *fiber.Ctx) error {
|
||||||
|
|||||||
Reference in New Issue
Block a user