     (utils/json-response result)))
 
 (defn months []
-  (let [result (db/last-n-months 6)]
+  (let [result (db/last-n-months (:months default-params))]
     (utils/json-response result)))
 
 (defn categories-last-month []

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

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

(def default-params
  {:months 6
   :transactions 25})

(defn by-week []
  (utils/json-response (db/get-transactions-by-week)))

(defn transactions []
  (let [limit (:transactions default-params)]
    (utils/json-response (db/get-all-transactions limit))))

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

(defn categories-ytd []
