Implement CaseSensitiveQuery #39
2 changed files with 3 additions and 1 deletions
|
@ -165,7 +165,7 @@
|
||||||
(response/redirect (get @conf/GLOBAL-CONFIG :homepage)))))
|
(response/redirect (get @conf/GLOBAL-CONFIG :homepage)))))
|
||||||
|
|
||||||
;; No querry specified - don't know what to search for
|
;; No querry specified - don't know what to search for
|
||||||
(when-not (prms "q")
|
(when-not (some f/known-filter-set (keys prms))
|
||||||
(throw (ex-info "400" {:status 400
|
(throw (ex-info "400" {:status 400
|
||||||
:header {"Content-Type" "text/plain"}
|
:header {"Content-Type" "text/plain"}
|
||||||
:body (str "400 You MUST specify query with one OR more'q=searchTerm' (or 'Q=SeARChteRm' for case sensitive) url parameter(s)\n\n\n"
|
:body (str "400 You MUST specify query with one OR more'q=searchTerm' (or 'Q=SeARChteRm' for case sensitive) url parameter(s)\n\n\n"
|
||||||
|
|
|
@ -34,3 +34,5 @@
|
||||||
{"Q" case-sensitive-filter
|
{"Q" case-sensitive-filter
|
||||||
"q" case-insensitive-filter})
|
"q" case-insensitive-filter})
|
||||||
|
|
||||||
|
(def known-filter-set (set (keys known-filters)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue