This commit is contained in:
Dot-Rar 2020-03-01 12:58:50 +00:00
parent 8044171e8c
commit a0a41d05db
2 changed files with 3 additions and 8 deletions

View File

@ -73,14 +73,6 @@ func CallbackHandler(ctx *gin.Context) {
store.Set("csrf", utils.RandStringRunes(32))
// Debug
encoded, err := json.Marshal(&currentUser); 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))

View File

@ -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)
}