mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 04:17:23 +00:00
Improve search
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"nysoure/server/dao"
|
||||
"nysoure/server/model"
|
||||
"nysoure/server/search"
|
||||
"nysoure/server/utils"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -272,7 +273,7 @@ func SearchResource(query string, page int) ([]model.ResourceView, int, error) {
|
||||
}
|
||||
|
||||
// check tag after removing spaces
|
||||
trimmed := strings.ReplaceAll(query, " ", "")
|
||||
trimmed := utils.RemoveSpaces(query)
|
||||
if trimmed != query {
|
||||
if err := checkTag(trimmed); err != nil {
|
||||
return nil, 0, err
|
||||
|
Reference in New Issue
Block a user