Use JSON instead of form for uniqueid
This commit is contained in:
parent
4ee58e69ff
commit
394bea3507
6
main.go
6
main.go
|
@ -416,10 +416,10 @@ func main() {
|
||||||
})
|
})
|
||||||
|
|
||||||
router.POST("/api/uniqueid", func(c *gin.Context) {
|
router.POST("/api/uniqueid", func(c *gin.Context) {
|
||||||
c.Request.ParseForm()
|
var data map[string]interface{}
|
||||||
data := c.Request.Form
|
c.ShouldBindJSON(&data)
|
||||||
|
|
||||||
token := data.Get("access_token")
|
token := data["access_token"].(string)
|
||||||
|
|
||||||
conn := get_db_connection()
|
conn := get_db_connection()
|
||||||
defer conn.Close()
|
defer conn.Close()
|
||||||
|
|
Reference in New Issue