reference. getting rid of upload temporarily.

This commit is contained in:
Bryce Covert
2018-11-09 23:29:56 -08:00
parent 77d7b99ebb
commit 878056e7af

View File

@@ -128,19 +128,9 @@
{:status 200 {:status 200
:body (pr-str {:imported (count raw-transactions) :body (pr-str {:imported (count raw-transactions)
:errors (map #(dissoc % :date) error-rows)}) :errors (map #(dissoc % :date) error-rows)})
:headers {"Content-Type" "application/edn"}})) :headers {"Content-Type" "application/edn"}})))
)
(context "/invoices" []
#_(POST "/upload"
{{ files "file"} :params :as params}
(let [{:keys [filename tempfile]} files
companies (companies/get-all)
vendors (vendors/get-all)]
(invoices/import (parse/parse-file (.getPath tempfile) filename) companies vendors)
{:status 200
:body (pr-str (invoices/get-pending ((:query-params params ) "company")))
:headers {"Content-Type" "application/edn"}}))
(context "/invoices" []
(POST "/upload-integreat" (POST "/upload-integreat"
{{:keys [excel-rows]} :edn-params user :identity} {{:keys [excel-rows]} :edn-params user :identity}
(assert-admin user) (assert-admin user)