(c *gin.Context)
| 244 | } |
| 245 | |
| 246 | func GetAllUsers(c *gin.Context) { |
| 247 | pageInfo := common.GetPageQuery(c) |
| 248 | users, total, err := model.GetAllUsers(pageInfo) |
| 249 | if err != nil { |
| 250 | common.ApiError(c, err) |
| 251 | return |
| 252 | } |
| 253 | |
| 254 | pageInfo.SetTotal(int(total)) |
| 255 | pageInfo.SetItems(users) |
| 256 | |
| 257 | common.ApiSuccess(c, pageInfo) |
| 258 | return |
| 259 | } |
| 260 | |
| 261 | func SearchUsers(c *gin.Context) { |
| 262 | keyword := c.Query("keyword") |
nothing calls this directly
no test coverage detected