January 2018
Intermediate to advanced
336 pages
7h 56m
English
Mostly, the Alert service will listen for events as an Observer and will not receive requests to send alerts via routes. If it is required to send alerts synchronously, the /alerts/email and /alerts/sms routes can be used, as defined in the following code snippet:
(def routes #{["/alerts/email" :post (conj common-interceptors `auth `core/validate `core/send-email `gen-events) :route-name :alert-email] ["/alerts/sms" :post (conj common-interceptors `auth `core/validate `core/send-sms `gen-events) :route-name :alert-sms]})
Read now
Unlock full access