Browse Source

Merge pull request #1898 from yogthos/patch-2

updated json-serialization to be a function
Mike Smith 9 years ago
parent
commit
0a66679b7a
1 changed files with 3 additions and 2 deletions
  1. 3 2
      frameworks/Clojure/luminus/hello/src/hello/routes/home.clj

+ 3 - 2
frameworks/Clojure/luminus/hello/src/hello/routes/home.clj

@@ -5,8 +5,9 @@
             [ring.util.response :refer [response content-type]]
             [clojure.java.io :as io]))
 
-(def json-serialization
+(defn json-serialization
   "Test 1: JSON serialization"
+  []
   (response {:message "Hello, World!"}))
 
 (defn single-query-test
@@ -43,7 +44,7 @@
 (defroutes home-routes
   (GET "/"                 [] "Hello, World!")
   (GET "/plaintext"        [] plaintext)
-  (GET "/json"             [] json-serialization)
+  (GET "/json"             [] (json-serialization))
   (GET "/db"               [] (single-query-test))
   (GET "/queries/"         [] (multiple-query-test 1))
   (GET "/queries/:queries" [queries] (multiple-query-test queries))