starting to be able to choose invoices

This commit is contained in:
Bryce Covert
2018-05-10 21:08:45 -07:00
parent 798bfae78a
commit 5fb5b2d412
11 changed files with 269 additions and 59 deletions

View File

@@ -0,0 +1,21 @@
(ns auto-ap.routes.checks
(:require [auto-ap.db.companies :as companies]
[auto-ap.db.vendors :as vendors]
[auto-ap.db.invoices :as invoices]
[auto-ap.db.utils :refer [query]]
[auto-ap.parse :as parse]
[auto-ap.routes.utils :refer [wrap-secure]]
[compojure.core :refer [GET POST context defroutes
wrap-routes]]
[clojure.string :as str]))
(defroutes routes
(wrap-routes
(context "/checks" []
(POST "/" {:keys [edn-params]}
(invoices/get-multi (:invoice-ids edn-params))
{:status 200
:body (pr-str (invoices/get-multi (:invoice-ids edn-params)))
:headers {"Content-Type" "application/edn"}}))
wrap-secure))