feat: add user list sorting and pagination enhancements (#1178)

* feat: add user list sorting and pagination enhancements

* feat: add user list sorting for THEME=air

* feat: add token list sorting and pagination enhancements

* feat: add token list sorting for THEME=air
This commit is contained in:
Benny
2024-03-17 19:25:36 +08:00
committed by GitHub
parent 08831881f1
commit 9821bc7281
8 changed files with 184 additions and 42 deletions

View File

@@ -16,7 +16,10 @@ func GetAllTokens(c *gin.Context) {
if p < 0 {
p = 0
}
tokens, err := model.GetAllUserTokens(userId, p*config.ItemsPerPage, config.ItemsPerPage)
order := c.Query("order")
tokens, err := model.GetAllUserTokens(userId, p*config.ItemsPerPage, config.ItemsPerPage, order)
if err != nil {
c.JSON(http.StatusOK, gin.H{
"success": false,