From d65c558cdca7934df4f684840be320bf24738739 Mon Sep 17 00:00:00 2001 From: jem Date: Fri, 12 Mar 2021 18:23:38 +0100 Subject: [PATCH] provide auth predicate --- shadow-cljs.edn | 2 +- src/main/cljc/mastodon_bot/core_domain.cljc | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/shadow-cljs.edn b/shadow-cljs.edn index ef8e219..417194b 100644 --- a/shadow-cljs.edn +++ b/shadow-cljs.edn @@ -3,7 +3,7 @@ "src/test/cljc" "src/test/cljs"] :dependencies [[orchestra "2019.02.06-1"] - [expound "0.8.4"]] + [expound "0.8.9"]] :builds {:test {:target :node-test :output-to "target/node-tests.js" :autorun true diff --git a/src/main/cljc/mastodon_bot/core_domain.cljc b/src/main/cljc/mastodon_bot/core_domain.cljc index 5927870..d206f97 100755 --- a/src/main/cljc/mastodon_bot/core_domain.cljc +++ b/src/main/cljc/mastodon_bot/core_domain.cljc @@ -10,8 +10,13 @@ (s/def ::mastodon md/mastodon-auth?) (s/def ::twitter twd/twitter-auth?) (s/def ::tumblr td/tumblr-auth?) + +(def auth? + (s/keys :opt-un [::mastodon ::twitter ::tumblr])) +(s/def ::auth auth?) + (s/def ::transform trd/transformations?) -(s/def ::auth (s/keys :opt-un [::mastodon ::twitter ::tumblr])) + (def config? (s/keys :req-un [::auth ::transform]))