Refactored that horrible abomination of a code
I don't do drugs but I must have or something, otherwise that is just unexplainable, I'm sorry if you had to see that, I really am
This commit is contained in:
parent
8d61968dc9
commit
18cc3e730c
1 changed files with 5 additions and 11 deletions
|
@ -145,18 +145,12 @@
|
|||
;; qrs (prms "q")
|
||||
self-uri (str (s/replace-first scheme ":" "")
|
||||
"://" server-name uri "?" query)
|
||||
;; queries (if (vector? qrs) qrs [qrs]) ; to always return vector
|
||||
real-chod (if-let [ch (or (and (vector? chod)
|
||||
(first chod))
|
||||
chod)]
|
||||
(try ;If we can't parse number from chod, use default 94
|
||||
(if (or (vector? chod)
|
||||
;; TODO: Do we seriously parse this twice?
|
||||
(<= (Integer/parseInt chod) 60)) ; Never accept chod lower than 60 TODO: don't hardcode this
|
||||
60 (Integer/parseInt chod))
|
||||
(catch Exception e
|
||||
94)))
|
||||
board-config (get-in @conf/GLOBAL-CONFIG [:boards-enabled board])
|
||||
real-chod (try (max (Integer/parseInt (or (and (vector? chod)
|
||||
(first chod))
|
||||
chod)) 60) ;HARDCODED CHoD
|
||||
(catch Exception _
|
||||
(get board-config :default-chod)))
|
||||
cache @watcher/chod-threads-cache]
|
||||
(println "\n\nRCVD: " rqst)
|
||||
;; (println rqst)
|
||||
|
|
Loading…
Reference in a new issue