This commit is contained in:
suyl
2021-07-15 18:12:22 +08:00
parent 7e2f221239
commit f996c4add1
2 changed files with 3 additions and 1 deletions

View File

@@ -63,7 +63,7 @@ func Login(c *gin.Context) {
user = &UserParam{}
)
globals.SugarLogger.Debugf("Begin API :%s params: %v ip: %s", c.Request.URL, "", c.ClientIP())
if err = c.Bind(&user); err != nil {
if err = c.ShouldBind(&user); err != nil {
c.JSON(http.StatusOK, &CallBack{
Code: model.ErrCodeNormal,
Desc: err.Error(),