mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-09-03 04:43:01 +00:00
Merge branch 'main' into refactor/ui
Resolve conflicts keeping the refactor/ui data-table row implementation (no memoization, so the upstream column-visibility memo fix is not needed) and adopting main's server-side user sorting and reworked high-risk retry dialog. Additionally fix a debounce race that resurrected cleared column filters on toolbar Reset, and add a built-in refresh control (manual refresh + Grafana-style auto-refresh intervals with hidden-tab pausing and per-table persistence) wired into every data-table page.
This commit is contained in:
+4
-2
@@ -308,7 +308,8 @@ func Register(c *gin.Context) {
|
||||
|
||||
func GetAllUsers(c *gin.Context) {
|
||||
pageInfo := common.GetPageQuery(c)
|
||||
users, total, err := model.GetAllUsers(pageInfo)
|
||||
sortOptions := model.NewUserSortOptions(c.Query("sort_by"), c.Query("sort_order"))
|
||||
users, total, err := model.GetAllUsers(pageInfo, sortOptions)
|
||||
if err != nil {
|
||||
common.ApiError(c, err)
|
||||
return
|
||||
@@ -337,7 +338,8 @@ func SearchUsers(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
pageInfo := common.GetPageQuery(c)
|
||||
users, total, err := model.SearchUsers(keyword, group, role, status, pageInfo.GetStartIdx(), pageInfo.GetPageSize())
|
||||
sortOptions := model.NewUserSortOptions(c.Query("sort_by"), c.Query("sort_order"))
|
||||
users, total, err := model.SearchUsers(keyword, group, role, status, pageInfo.GetStartIdx(), pageInfo.GetPageSize(), sortOptions)
|
||||
if err != nil {
|
||||
common.ApiError(c, err)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user