Last active
June 1, 2017 03:40
-
-
Save temochka/d2d9539da752ac8094bb28ba1ccb3a55 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns cursive-test) | |
(defn $render-digest | |
[{{{accept "accept"} :headers} :request | |
{:keys [date-range]} ::request | |
record ::entry}] | |
(let [digest (apply db/get-digest-data record date-range)] | |
(if (re-matches #"^application/json;?.*" accept) | |
(json/generate-string digest) | |
(ring-response {:headers {"Cache-Control" "max-age=0, private, no-cache, no-store, must-revalidate" | |
"Content-Type" "text/html;charset=utf-8"} | |
:body (apply str (digest-template record digest))})))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns cursive-test) | |
(defn $render-digest | |
[{{{accept "accept"} :headers} :request} | |
{:keys [date-range]} ::request | |
record ::entry] | |
(let [digest (apply db/get-digest-data record date-range)] | |
(if (re-matches #"^application/json;?.*" accept) | |
(json/generate-string digest) | |
(ring-response {:headers {"Cache-Control" "max-age=0, private, no-cache, no-store, must-revalidate" | |
"Content-Type" "text/html;charset=utf-8"} | |
:body (apply str (digest-template record digest))})))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/dmarc/cursive-test.clj b/src/dmarc/cursive-test.clj | |
index 041a172..3780c6c 100644 | |
--- a/src/dmarc/cursive-test.clj | |
+++ b/src/dmarc/cursive-test.clj | |
@@ -1,9 +1,9 @@ | |
(ns cursive-test) | |
(defn $render-digest | |
- [{{{accept "accept"} :headers} :request | |
+ [{{{accept "accept"} :headers} :request} | |
{:keys [date-range]} ::request | |
- record ::entry}] | |
+ record ::entry] | |
(let [digest (apply db/get-digest-data record date-range)] | |
(if (re-matches #"^application/json;?.*" accept) | |
(json/generate-string digest) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
IDEA information
Cursive information