UserLogin handles user login.
(c *gin.Context)
| 21 | |
| 22 | // UserLogin handles user login. |
| 23 | func UserLogin(c *gin.Context) { |
| 24 | var service service.UserLoginService |
| 25 | if err := c.ShouldBind(&service); err == nil { |
| 26 | res := service.Login(c) |
| 27 | c.JSON(200, res) |
| 28 | } else { |
| 29 | c.JSON(200, ErrorResponse(err)) |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | // UserMe returns the user profile. |
| 34 | func UserMe(c *gin.Context) { |
nothing calls this directly
no test coverage detected