   (GET "/months" [] (months))
   (GET "/summary" [] (tables/summary
                       (db/get-transactions-by-week)
-                      (db/recent-transactions 12)
-                      (db/last-n-months 6))))
+                      (db/recent-transactions (:transactions default-params))
+                      (db/last-n-months (:months default-params)))))

                      (utils/json-response
                        {:error (str "Transaction not found for id " id)})))

(defn transactions []
  (let [default "25"
        l (get-in ctx [:request :params :limit] default)
        limit (utils/parse-number l)]
    (utils/json-response (db/get-all-transactions limit))))

(defn category [category-id]
  (let [result (db/category-monhly (Integer/parseInt category-id))]
    (utils/json-response result)))

(defn categories-ytd []

            [swanson.views.layout :as layout]
            [swanson.views.tables :as tables]
            [hiccup.element :refer [javascript-tag]]))

(defresource post-transaction []
  :allowed-methods [:post]
