This commit is contained in:
Erikas 2024-07-05 00:33:05 +03:00
parent 7e740d7623
commit 0e2b6f4da4

View File

@ -6,7 +6,6 @@ import (
"encoding/hex" "encoding/hex"
"encoding/json" "encoding/json"
"io" "io"
"log"
"net/http" "net/http"
"github.com/gin-contrib/sessions" "github.com/gin-contrib/sessions"
@ -48,7 +47,6 @@ func getLoginCallback(c *gin.Context) {
token, err := discordConf.Exchange(context.Background(), c.Query("code")) token, err := discordConf.Exchange(context.Background(), c.Query("code"))
if err != nil { if err != nil {
log.Println(err)
c.HTML(http.StatusInternalServerError, "error_raw.tmpl", gin.H{ c.HTML(http.StatusInternalServerError, "error_raw.tmpl", gin.H{
"errorMessage": "Failed to exchange code for token", "errorMessage": "Failed to exchange code for token",
}) })
@ -57,7 +55,6 @@ func getLoginCallback(c *gin.Context) {
res, err := discordConf.Client(context.Background(), token).Get("https://discord.com/api/users/@me") res, err := discordConf.Client(context.Background(), token).Get("https://discord.com/api/users/@me")
if err != nil { if err != nil {
log.Println(err)
c.HTML(http.StatusInternalServerError, "error_raw.tmpl", gin.H{ c.HTML(http.StatusInternalServerError, "error_raw.tmpl", gin.H{
"errorMessage": "Failed to get user details from Discord", "errorMessage": "Failed to get user details from Discord",
}) })