Skip to content

Commit

Permalink
Fixed issue
Browse files Browse the repository at this point in the history
  • Loading branch information
SebiWrn committed Dec 28, 2023
1 parent 03c8c12 commit aa458e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (r usersRoutes) prepareUserSearch(c *gin.Context) (users []model.User, err
reg, _ := regexp.Compile("[^a-zA-Z0-9 ]+")
q = reg.ReplaceAllString(q, "")
// Removed in order to make the search work with empty query but selected role
if len(q) < 3 && rQ == "-1" {
if len(q) < 3 && (rQ == "-1" || rQ == "") {
_ = c.Error(tools.RequestError{
Status: http.StatusBadRequest,
CustomMessage: "query too short (minimum length is 3)",
Expand Down

0 comments on commit aa458e0

Please sign in to comment.