startup for getting ezcater going.

This commit is contained in:
2022-07-09 08:32:33 -07:00
parent 892674343d
commit 540038b4dd
2 changed files with 23 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
(ns auto-ap.routes.ezcater
(:require
[clojure.tools.logging :as log]
[compojure.core :refer [context defroutes GET POST]]
[ring.middleware.json :refer [wrap-json-params]]
[ring.util.request :refer [body-string]]))
(defroutes routes
(wrap-routes
(context "/ezcater" []
(GET "/event" request
(log/info (str "GET EVENT " (body-string request) request))
{:status 200
:headers {"Content-Type" "application/json"}
:body "{}"})
(POST "/event" request
(log/info (str "POST EVENT " (body-string request) request))
{:status 200
:headers {"Content-Type" "application/json"}
:body "{}"}))
wrap-json-params))