UserRegister handles user registration.
(c *gin.Context)
| 10 | |
| 11 | // UserRegister handles user registration. |
| 12 | func UserRegister(c *gin.Context) { |
| 13 | var service service.UserRegisterService |
| 14 | if err := c.ShouldBind(&service); err == nil { |
| 15 | res := service.Register() |
| 16 | c.JSON(200, res) |
| 17 | } else { |
| 18 | c.JSON(200, ErrorResponse(err)) |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | // UserLogin handles user login. |
| 23 | func UserLogin(c *gin.Context) { |
nothing calls this directly
no test coverage detected