Skip to content

Commit

Permalink
routes: Improve routing semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
goshatch committed Sep 3, 2024
1 parent 6e34774 commit abd908e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/apossiblespace/parts.clj
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,19 @@
["/ping"
{:get {:handler (fn [_] {:status 200 :body {:message "Pong!"}})}}]
["/auth"
["/register"
{:post {:handler auth/register}}]
["/login"
{:post {:handler auth/login}}]
["/logout"
{:post {:handler auth/logout
:middleware [auth/jwt-auth]}}]]
["/account"
{:get {:handler account/get-account}
:put {:handler account/update-account}
:delete {:handler account/delete-account}
:middleware [auth/jwt-auth]}]]]
[""
{:get {:handler account/get-account}
:patch {:handler account/update-account}
:delete {:handler account/delete-account}
:middleware [auth/jwt-auth]}]
["/register"
{:post {:handler auth/register}}]]]]
{:data {:middleware [[wrap-json-body {:keywords? true}]
wrap-json-response]}})
(ring/routes
Expand Down

0 comments on commit abd908e

Please sign in to comment.