Param error message generate

This commit is contained in:
HFO4
2019-11-06 16:42:13 +08:00
parent 6539ae20fa
commit 6ba4d1ae82
3 changed files with 44 additions and 10 deletions

View File

@@ -1,7 +1,6 @@
package controllers
import (
"Cloudreve/serializer"
"Cloudreve/service/user"
"github.com/gin-gonic/gin"
)
@@ -10,11 +9,8 @@ import (
func UserLogin(c *gin.Context) {
var service service.UserLoginService
if err := c.ShouldBindJSON(&service); err == nil {
//res := service.Login(c)
c.JSON(200, serializer.Response{
Code: 0,
Msg: "OK",
})
res := service.Login(c)
c.JSON(200, res)
} else {
c.JSON(200, ErrorResponse(err))
}