From 394bea350790ac36b5e5ace97d6d5dcc7741ae5c Mon Sep 17 00:00:00 2001 From: Arzumify Date: Sun, 28 Apr 2024 11:01:04 +0100 Subject: [PATCH] Use JSON instead of form for uniqueid --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 6e95144..35b7760 100644 --- a/main.go +++ b/main.go @@ -416,10 +416,10 @@ func main() { }) router.POST("/api/uniqueid", func(c *gin.Context) { - c.Request.ParseForm() - data := c.Request.Form + var data map[string]interface{} + c.ShouldBindJSON(&data) - token := data.Get("access_token") + token := data["access_token"].(string) conn := get_db_connection() defer conn.Close()