@@ -177,6 +177,9 @@ func (c *Controller) ServeSearchTwo(r *http.Request) *spec.Response {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return spec.NewError(10, "please provide a `query` parameter")
|
return spec.NewError(10, "please provide a `query` parameter")
|
||||||
}
|
}
|
||||||
|
if query == `""` {
|
||||||
|
query = ""
|
||||||
|
}
|
||||||
query = fmt.Sprintf("%%%s%%", strings.TrimSuffix(query, "*"))
|
query = fmt.Sprintf("%%%s%%", strings.TrimSuffix(query, "*"))
|
||||||
|
|
||||||
results := &spec.SearchResultTwo{}
|
results := &spec.SearchResultTwo{}
|
||||||
|
|||||||
@@ -182,6 +182,9 @@ func (c *Controller) ServeSearchThree(r *http.Request) *spec.Response {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return spec.NewError(10, "please provide a `query` parameter")
|
return spec.NewError(10, "please provide a `query` parameter")
|
||||||
}
|
}
|
||||||
|
if query == `""` {
|
||||||
|
query = ""
|
||||||
|
}
|
||||||
query = fmt.Sprintf("%%%s%%", strings.TrimSuffix(query, "*"))
|
query = fmt.Sprintf("%%%s%%", strings.TrimSuffix(query, "*"))
|
||||||
results := &spec.SearchResultThree{}
|
results := &spec.SearchResultThree{}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user