mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 20:50:06 +00:00
feat: support id query for "list" apis (#908)
* feat: support id query for "list" apis * gosec
This commit is contained in:
@@ -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