mirror of
				https://github.com/songquanpeng/one-api.git
				synced 2025-11-04 15:53:42 +08:00 
			
		
		
		
	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:
		@@ -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,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user