Skip to content

Commit

Permalink
Merge pull request #40 from TheJacksonLaboratory/feature/query-patter…
Browse files Browse the repository at this point in the history
…n-validation

trimming queries
  • Loading branch information
iimpulse authored Oct 25, 2024
2 parents 3705f90 + 6adc56a commit 16242fc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ public HttpResponse<?> searchEntity(@Schema(minLength = 1, maxLength = 20, type
@QueryValue(value = "limit", defaultValue = "10") int limit) {

if (entity.equalsIgnoreCase("GENE")){
return HttpResponse.ok(this.searchService.searchGene(q.toUpperCase(), page, limit));
return HttpResponse.ok(this.searchService.searchGene(q.toUpperCase().trim(), page, limit));
} else if (entity.equalsIgnoreCase("DISEASE")){
return HttpResponse.ok(this.searchService.searchDisease(q.toUpperCase(), page, limit));
return HttpResponse.ok(this.searchService.searchDisease(q.toUpperCase().trim(), page, limit));
} else {
return HttpResponse.badRequest();
}
Expand Down

0 comments on commit 16242fc

Please sign in to comment.