some visual feedback that it worked
This commit is contained in:
@@ -89,14 +89,10 @@
|
||||
(map #(str/split % #"\t"))
|
||||
(map #(into {} (filter identity (map (fn [c k] [k c] ) % columns))))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(map (parse-or-error :amount parse-amount))
|
||||
(map (parse-or-error :account-id parse-account-id))
|
||||
(map (parse-or-error :date parse-date)))
|
||||
error-rows (filter :errors rows)
|
||||
|
||||
raw-transactions (vec (->> rows
|
||||
(filter #(not (seq (:errors %))) )
|
||||
@@ -110,7 +106,8 @@
|
||||
(manual-import raw-transactions company-id 1)
|
||||
|
||||
{:status 200
|
||||
:body (pr-str {:status "success"})
|
||||
:body (pr-str {:imported (count raw-transactions)
|
||||
:errors (map #(dissoc % :date) error-rows)})
|
||||
:headers {"Content-Type" "application/edn"}}))
|
||||
)
|
||||
(context "/invoices" []
|
||||
|
||||
Reference in New Issue
Block a user