mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-11-04 08:40:20 +00:00
feat: support id query for "list" apis (#908)
* feat: support id query for "list" apis * gosec
This commit is contained in:
1 parent
0b54aa070d
commit
fa30df0320
10 files changed
+82
-1
No files matched your search
@@ -247,7 +247,8 @@ func listHandler[S ~[]E, E model.CommonInterface](handler handlerFunc[S]) func(*
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, model.CommonResponse[S]{Success: true, Data: filter(c, data)})
|
||||
filtered := filter(c, data)
|
||||
c.JSON(http.StatusOK, model.CommonResponse[S]{Success: true, Data: model.SearchByIDCtx(c, filtered)})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user