Fix query detector to support Q and all future query types
This commit is contained in:
parent
1890f14f9e
commit
a951e4f470
2 changed files with 3 additions and 1 deletions
|
@ -165,7 +165,7 @@
|
|||
(response/redirect (get @conf/GLOBAL-CONFIG :homepage)))))
|
||||
|
||||
;; 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
|
||||
: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"
|
||||
|
|
|
@ -34,3 +34,5 @@
|
|||
{"Q" case-sensitive-filter
|
||||
"q" case-insensitive-filter})
|
||||
|
||||
(def known-filter-set (set (keys known-filters)))
|
||||
|
||||
|
|
Loading…
Reference in a new issue