fix: 接通服务器V2排序链路
- 将排序参数从V2 Handler传递至Service与Repository - 增加仓储分页排序与参数白名单测试
This commit is contained in:
1 parent
09e6271bb4
commit
83662487cb
7 files changed
+98
-41
No files matched your search
@@ -57,7 +57,9 @@ func (h *ServerHandlerV2) ListServers(c *gin.Context) {
|
||||
status := c.Query("status")
|
||||
regionID := c.Query("region_id")
|
||||
|
||||
list, total, err := h.svc.ListServers(query.Keyword, status, regionID, query.Page, query.PageSize)
|
||||
list, total, err := h.svc.ListServers(
|
||||
query.Keyword, status, regionID, query.Sort, query.Order, query.Page, query.PageSize,
|
||||
)
|
||||
if err != nil {
|
||||
utils.InternalError(c, "查询失败")
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user