mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 12:17:24 +00:00
Add excludedRID param to collection search api.
This commit is contained in:
@@ -202,7 +202,14 @@ func handleSearchUserCollections(c fiber.Ctx) error {
|
||||
if username == "" {
|
||||
return model.NewRequestError("username is required")
|
||||
}
|
||||
cols, err := service.SearchUserCollections(username, keyword)
|
||||
excludedRIDStr := c.Query("excludedRID", "")
|
||||
var excludedRID uint = 0
|
||||
if excludedRIDStr != "" {
|
||||
if rid, err := strconv.Atoi(excludedRIDStr); err == nil && rid > 0 {
|
||||
excludedRID = uint(rid)
|
||||
}
|
||||
}
|
||||
cols, err := service.SearchUserCollections(username, keyword, excludedRID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user