diff --git a/src/rss_thread_watch/feed_generator.clj b/src/rss_thread_watch/feed_generator.clj index ed9cbe5..9b0bf83 100644 --- a/src/rss_thread_watch/feed_generator.clj +++ b/src/rss_thread_watch/feed_generator.clj @@ -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)