Use JSON instead of form for uniqueid

This commit is contained in:
Tracker-Friendly 2024-04-28 11:01:04 +01:00
parent 4ee58e69ff
commit 394bea3507
1 changed files with 3 additions and 3 deletions

View File

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