The final HTTP method to implement is the delete route, as follows:
(defn delete-card-handler [card-id]
(db/delete! Card :id card-id)
(ok))
(def card-routes
[ ; ...
(DELETE "/cards/:id" []
:path-params [id :- s/Int]
(delete-card-handler id))])
The final HTTP method to implement is the delete route, as follows:
(defn delete-card-handler [card-id]
(db/delete! Card :id card-id)
(ok))
(def card-routes
[ ; ...
(DELETE "/cards/:id" []
:path-params [id :- s/Int]
(delete-card-handler id))])