MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / SearchUsers

Function SearchUsers

controller/user.go:261–275  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

259}
260
261func 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
277func GetUser(c *gin.Context) {
278 id, err := strconv.Atoi(c.Param("id"))

Callers

nothing calls this directly

Calls 8

GetPageQueryFunction · 0.92
SearchUsersFunction · 0.92
ApiErrorFunction · 0.92
ApiSuccessFunction · 0.92
GetStartIdxMethod · 0.80
GetPageSizeMethod · 0.80
SetTotalMethod · 0.80
SetItemsMethod · 0.80

Tested by

no test coverage detected