refactor: improve search user collections logic to handle optional keyword

This commit is contained in:
2025-07-31 11:01:49 +08:00
parent 470324221d
commit 40fb3a93b6
3 changed files with 9 additions and 5 deletions

View File

@@ -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")