Browse Source

compojure/http-kit: Undo change to plaintext test

To match aleph's behavior, I restored the plaintext test to use def.
Keith R. Gustafson 9 years ago
parent
commit
a9c070b847

+ 2 - 3
frameworks/Clojure/compojure/hello/src/hello/handler.clj

@@ -231,9 +231,8 @@
       (update-and-persist-raw)
       (update-and-persist-raw)
       (ring-resp/response)))
       (ring-resp/response)))
 
 
-(defn plaintext
+(def plaintext
   "Test 6: Plaintext"
   "Test 6: Plaintext"
-  []
   (->
   (->
     (ring-resp/response "Hello, World!")
     (ring-resp/response "Hello, World!")
     (ring-resp/content-type "text/plain")))
     (ring-resp/content-type "text/plain")))
@@ -241,7 +240,7 @@
 ;; Define route handlers
 ;; Define route handlers
 (defroutes app-routes
 (defroutes app-routes
   (GET "/"                     [] "Hello, World!")
   (GET "/"                     [] "Hello, World!")
-  (GET "/plaintext"            [] (plaintext))
+  (GET "/plaintext"            [] plaintext)
   (GET "/json"                 [] (json-serialization))
   (GET "/json"                 [] (json-serialization))
   (GET "/db"                   [] (single-query-test))
   (GET "/db"                   [] (single-query-test))
   (GET "/queries/:queries"     [queries] (multiple-queries-test queries))
   (GET "/queries/:queries"     [queries] (multiple-queries-test queries))

+ 2 - 3
frameworks/Clojure/http-kit/hello/src/hello/handler.clj

@@ -233,9 +233,8 @@
       (update-and-persist-raw)
       (update-and-persist-raw)
       (ring-resp/response)))
       (ring-resp/response)))
 
 
-(defn plaintext
+(def plaintext
   "Test 6: Plaintext"
   "Test 6: Plaintext"
-  []
   (->
   (->
     (ring-resp/response "Hello, World!")
     (ring-resp/response "Hello, World!")
     (ring-resp/content-type "text/plain")))
     (ring-resp/content-type "text/plain")))
@@ -243,7 +242,7 @@
 ;; Define route handlers
 ;; Define route handlers
 (defroutes app-routes
 (defroutes app-routes
   (GET "/"                     [] "Hello, World!")
   (GET "/"                     [] "Hello, World!")
-  (GET "/plaintext"            [] (plaintext))
+  (GET "/plaintext"            [] plaintext)
   (GET "/json"                 [] (json-serialization))
   (GET "/json"                 [] (json-serialization))
   (GET "/db"                   [] (single-query-test))
   (GET "/db"                   [] (single-query-test))
   (GET "/queries/:queries"     [queries] (multiple-queries-test queries))
   (GET "/queries/:queries"     [queries] (multiple-queries-test queries))