diff --git a/src/main/mastodon_bot/core.cljs b/src/main/mastodon_bot/core.cljs index 4e3638e..caeb380 100755 --- a/src/main/mastodon_bot/core.cljs +++ b/src/main/mastodon_bot/core.cljs @@ -19,12 +19,14 @@ (s/def ::twitter map?) (s/def ::tumblr map?) (s/def ::rss map?) + (def config? (s/keys :req [::mastodon-config] :opt [::twitter ::tumblr ::rss])) +(s/def ::config config?) ;this has to stay on top - only ns-keywords can be uses in spec (defn-spec mastodon-config ::mastodon-config - [config any?] + [config ::config] (::mastodon-config config)) (defn find-config [] @@ -161,3 +163,4 @@ (parse-feed last-post-time parser feed)))))))) (set! *main-cli-fn* -main) +(st/instrument 'mastodon-config) diff --git a/src/main/mastodon_bot/mastodon_api.cljs b/src/main/mastodon_bot/mastodon_api.cljs index 16350cd..90f314b 100755 --- a/src/main/mastodon_bot/mastodon_api.cljs +++ b/src/main/mastodon_bot/mastodon_api.cljs @@ -24,7 +24,7 @@ (s/def ::max-post-length (fn [n] (and (int? n) (<= n 600) - (< n 0)))) + (> n 0)))) (s/def ::content-filters (s/* ::content-filter)) (s/def ::keyword-filters (s/* ::keyword-filter))