reference. getting rid of upload temporarily.
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user