(c *gin.Context)
| 92 | } |
| 93 | |
| 94 | func listAllUsers(c *gin.Context) { |
| 95 | response := gin.H{"code": http.StatusOK} |
| 96 | defer c.JSON(http.StatusOK, response) |
| 97 | total, users := mydb.getAllUsers( |
| 98 | c.GetBool("paging"), |
| 99 | c.GetString("query"), |
| 100 | c.GetString("order"), |
| 101 | c.GetInt("offset"), |
| 102 | c.GetInt("limit"), |
| 103 | ) |
| 104 | response["code"] = http.StatusOK |
| 105 | response["total"] = total |
| 106 | response["users"] = users |
| 107 | } |
| 108 | |
| 109 | /* |
| 110 | 1. 获取用户token |
nothing calls this directly
no test coverage detected