Browse Source

Add special routes for single-query test with response not in a vector

Keith R. Gustafson 11 years ago
parent
commit
9cc4e829e4
1 changed files with 2 additions and 0 deletions
  1. 2 0
      luminus/hello/src/hello/routes/home.clj

+ 2 - 0
luminus/hello/src/hello/routes/home.clj

@@ -7,7 +7,9 @@
 (defroutes home-routes
 (defroutes home-routes
   (GET "/" [] "Hello, World!")
   (GET "/" [] "Hello, World!")
   (GET "/json" [] (response/json {:message "Hello, World!"}))
   (GET "/json" [] (response/json {:message "Hello, World!"}))
+  (GET "/db" [] (response/json (first (run-queries 1))))
   (GET "/db/:queries" [queries] (response/json (run-queries (get-query-count queries))))
   (GET "/db/:queries" [queries] (response/json (run-queries (get-query-count queries))))
+  (GET "/dbraw" [] (response/json (first (run-queries-raw 1))))
   (GET "/dbraw/:queries" [queries] (response/json (run-queries-raw (get-query-count queries))))  
   (GET "/dbraw/:queries" [queries] (response/json (run-queries-raw (get-query-count queries))))  
   (GET "/fortune" [] (layout/render "home.html" {:messages (get-fortunes)})))
   (GET "/fortune" [] (layout/render "home.html" {:messages (get-fortunes)})))