Setting up initial company setup.

This commit is contained in:
Bryce Covert
2018-04-03 18:19:51 -07:00
parent 222bcbdf5c
commit b810deb609
11 changed files with 55 additions and 20 deletions

View File

@@ -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)]