From a0a41d05db3970491f5be1f28508dacdbf1ac13e Mon Sep 17 00:00:00 2001 From: Dot-Rar Date: Sun, 1 Mar 2020 12:58:50 +0000 Subject: [PATCH] debug --- app/http/endpoints/root/callback.go | 8 -------- utils/discord/endpoints.go | 3 +++ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/http/endpoints/root/callback.go b/app/http/endpoints/root/callback.go index 1d7b1f5..1903377 100644 --- a/app/http/endpoints/root/callback.go +++ b/app/http/endpoints/root/callback.go @@ -73,14 +73,6 @@ func CallbackHandler(ctx *gin.Context) { store.Set("csrf", utils.RandStringRunes(32)) - // Debug - encoded, err := json.Marshal(¤tUser); if err != nil { - log.Error(err.Error()) - return - } - - fmt.Println(string(encoded)) - store.Set("userid", currentUser.Id) store.Set("name", currentUser.Username) store.Set("avatar", fmt.Sprintf("https://cdn.discordapp.com/avatars/%s/%s.webp", currentUser.Id, currentUser.Avatar)) diff --git a/utils/discord/endpoints.go b/utils/discord/endpoints.go index 7df507c..f3b318c 100644 --- a/utils/discord/endpoints.go +++ b/utils/discord/endpoints.go @@ -3,6 +3,7 @@ package discord import ( "bytes" "encoding/json" + "fmt" "github.com/TicketsBot/GoPanel/config" "github.com/gin-gonic/contrib/sessions" "github.com/pasztorpisti/qs" @@ -117,6 +118,8 @@ func (e *Endpoint) Request(store sessions.Session, contentType *ContentType, bod return err } + fmt.Println(string(content)) + if rawResponse != nil { *rawResponse<-string(content) }