Fix exchange bind json error

Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
2026-01-20 19:04:26 +08:00
parent cd93491d98
commit 89c2d11f19

View File

@@ -1,6 +1,7 @@
package auth
import (
"fmt"
"net/url"
"nixcn-cms/data"
"nixcn-cms/pkgs/authcode"
@@ -17,8 +18,9 @@ func Exchange(c *gin.Context) {
State string `json:"state"`
}
err := c.BindJSON(exchangeReq)
err := c.BindJSON(&exchangeReq)
if err != nil {
fmt.Println(err)
utils.HttpResponse(c, 400, "", "invalid request")
return
}