(c *gin.Context)
| 259 | } |
| 260 | |
| 261 | func SearchUsers(c *gin.Context) { |
| 262 | keyword := c.Query("keyword") |
| 263 | group := c.Query("group") |
| 264 | pageInfo := common.GetPageQuery(c) |
| 265 | users, total, err := model.SearchUsers(keyword, group, pageInfo.GetStartIdx(), pageInfo.GetPageSize()) |
| 266 | if err != nil { |
| 267 | common.ApiError(c, err) |
| 268 | return |
| 269 | } |
| 270 | |
| 271 | pageInfo.SetTotal(int(total)) |
| 272 | pageInfo.SetItems(users) |
| 273 | common.ApiSuccess(c, pageInfo) |
| 274 | return |
| 275 | } |
| 276 | |
| 277 | func GetUser(c *gin.Context) { |
| 278 | id, err := strconv.Atoi(c.Param("id")) |
nothing calls this directly
no test coverage detected