Skip to content

Commit

Permalink
cron logic
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsz committed Nov 26, 2017
1 parent 3769612 commit 7533233
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/certificaat/interface/cli.clj
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,13 @@
(puget/cprint config-options)))
"cron" (let [cli-options (validate ::domain/cli-options options)
config-options (validate ::domain/config (c/read-config options))
options (merge config-options cli-options)]
(request options)
options (merge config-options cli-options)
{domain :domain config-dir :config-dir} options]
(if (k/valid? (str config-dir domain "/authorization." domain ".uri") options)
(request options)
(do (authorize options)
(h/run-hooks :before-challenge options)
(accept-challenges options)
(request options)))
(h/run-hooks :after-request options))))))

0 comments on commit 7533233

Please sign in to comment.