Setting up initial company setup.
This commit is contained in:
@@ -79,6 +79,11 @@
|
||||
(routes (ANY "*" [] (response/resource-response "index.html" {:root "public"}))))
|
||||
|
||||
(defroutes api-routes
|
||||
|
||||
(GET "/api/companies" []
|
||||
{:status 200
|
||||
:body (pr-str (companies/get-all))
|
||||
:headers {"Content-Type" "application/edn"}})
|
||||
|
||||
(GET "/api/invoices" []
|
||||
{:status 200
|
||||
@@ -119,6 +124,7 @@
|
||||
(let [{:keys [filename tempfile]} files
|
||||
existing-invoices (invoices/get-all)
|
||||
companies (companies/get-all)]
|
||||
(println companies)
|
||||
(invoices/insert-multi!
|
||||
(for [{:keys [total date invoice-number customer-identifier vendor] :as row}
|
||||
(parse/parse-file (.getPath tempfile) filename)]
|
||||
|
||||
Reference in New Issue
Block a user