Skip to content

Commit 74b858a

Browse files
committed
fix: binding
1 parent fedc317 commit 74b858a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/handlers/token.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
func TokenHandler() gin.HandlerFunc {
2323
return func(gc *gin.Context) {
2424
var reqBody map[string]string
25-
if err := gc.Bind(&reqBody); err != nil {
25+
if err := gc.BindJSON(&reqBody); err != nil {
2626
log.Debug("Error binding JSON: ", err)
2727
gc.JSON(http.StatusBadRequest, gin.H{
2828
"error": "error_binding_json",

0 commit comments

Comments
 (0)