Implement CaseSensitiveQuery #39

Merged
Felisp merged 12 commits from CaseSensitiveQuery into stable 2024-09-24 02:07:26 +02:00
2 changed files with 3 additions and 1 deletions
Showing only changes of commit a951e4f470 - Show all commits

View file

@ -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"

View file

@ -34,3 +34,5 @@
{"Q" case-sensitive-filter
"q" case-insensitive-filter})
(def known-filter-set (set (keys known-filters)))