mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 12:17:24 +00:00
Skip empty keywords in search query
This commit is contained in:
@@ -285,6 +285,9 @@ func SearchResource(query string, page int) ([]model.ResourceView, int, error) {
|
|||||||
temp := make(map[uint]time.Time)
|
temp := make(map[uint]time.Time)
|
||||||
first := true
|
first := true
|
||||||
for _, keyword := range keywords {
|
for _, keyword := range keywords {
|
||||||
|
if keyword == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
res, err := searchWithKeyword(keyword)
|
res, err := searchWithKeyword(keyword)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, 0, err
|
return nil, 0, err
|
||||||
|
Reference in New Issue
Block a user