Created
December 18, 2017 04:02
-
-
Save swlkr/6276bd76aacc67c79652c6eb35c5d68f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def routes | |
(-> (trail/resource :posts :only [:index :show]))) | |
; => | |
[ | |
[:get "/posts" posts/index] | |
[:get "/posts/:id" posts/show] | |
] | |
(def routes | |
(-> (trail/resource :posts :except [:index :show]))) | |
; => | |
[ | |
[:get "/posts/:id/fresh" posts/fresh] | |
[:get "/posts/:id/edit" posts/edit] | |
[:post "/posts" posts/create] | |
[:put "/posts/:id" posts/change] | |
[:delete "/posts/:id" posts/delete] | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment