mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 12:17:24 +00:00
refactor: improve search user collections logic to handle optional keyword
This commit is contained in:
@@ -195,9 +195,9 @@ func handleRemoveResourceFromCollection(c fiber.Ctx) error {
|
||||
|
||||
func handleSearchUserCollections(c fiber.Ctx) error {
|
||||
keyword := c.Query("keyword", "")
|
||||
if keyword == "" {
|
||||
return model.NewRequestError("keyword is required")
|
||||
}
|
||||
// if keyword == "" {
|
||||
// return model.NewRequestError("keyword is required")
|
||||
// }
|
||||
username := c.Query("username", "")
|
||||
if username == "" {
|
||||
return model.NewRequestError("username is required")
|
||||
|
Reference in New Issue
Block a user