diff options
author | Tim <contact@bytim.eu> | 2025-05-15 20:09:08 +0200 |
---|---|---|
committer | Tim <contact@bytim.eu> | 2025-05-15 20:09:08 +0200 |
commit | 0d62cec021750e42e1b14f6a0d33db998fbffe4a (patch) | |
tree | ebbade144318e547abaa252f00ca3911c47d85c6 /src/chef/routes.clj | |
parent | 587976b8a16b884ccd7b7dba9ff7209772d395ce (diff) | |
download | chef-0d62cec021750e42e1b14f6a0d33db998fbffe4a.tar.xz chef-0d62cec021750e42e1b14f6a0d33db998fbffe4a.zip |
Change oauth flow + create api route to create new category
Diffstat (limited to 'src/chef/routes.clj')
-rw-r--r-- | src/chef/routes.clj | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/chef/routes.clj b/src/chef/routes.clj index 27d6dfd..8ade8d1 100644 --- a/src/chef/routes.clj +++ b/src/chef/routes.clj @@ -9,14 +9,20 @@ [chef.pages.home :as cphome] [chef.pages.admin :as cpadmin] - [chef.components.search :as ccsearch])) + [chef.components.search :as ccsearch] + + [chef.pages.admin.api :as cpaapi])) (def router [["/" {:get {:handler cphome/handler}}] ["/admin/" {:get {:handler cpadmin/handler}}] ["/static/*" (rring/create-resource-handler)] ["/components" - ["/search" {:get {:handler ccsearch/handler}}]]]) + ["/search" {:get {:handler ccsearch/handler}}]] + + ["/api" + ["/admin" + ["/create-category" {:post {:handler cpaapi/create-category}}]]]]) (def ring-handler (delay (-> router rring/router @@ -28,7 +34,7 @@ :scopes (cstr/split (env/env "OAUTH_SCOPES") #",") :launch-uri "/auth" :redirect-uri "/auth/callback" - :landing-uri "/" + :landing-uri "/admin" :pkce? true}}) rmparams/wrap-params rmsession/wrap-session))) |