(c *gin.Context)
| 77 | } |
| 78 | |
| 79 | func UserInfo(c *gin.Context) { |
| 80 | token := c.Query("token") |
| 81 | |
| 82 | if user, exist := usersLoginInfo[token]; exist { |
| 83 | c.JSON(http.StatusOK, UserResponse{ |
| 84 | Response: Response{StatusCode: 0}, |
| 85 | User: user, |
| 86 | }) |
| 87 | } else { |
| 88 | c.JSON(http.StatusOK, UserResponse{ |
| 89 | Response: Response{StatusCode: 1, StatusMsg: "User doesn't exist"}, |
| 90 | }) |
| 91 | } |
| 92 | } |
nothing calls this directly
no outgoing calls
no test coverage detected