Skip to content

Commit

Permalink
route fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pushcx committed Aug 21, 2019
1 parent 441786e commit a58393c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@
get "/search" => "search#index"
get "/search/:q" => "search#index"

resources :stories do
resources :stories, except: [:index] do
get '/stories/:short_id', to: redirect('/s/%{short_id}')
post "upvote"
post "downvote"
post "unvote"
Expand All @@ -84,8 +85,9 @@
post "/stories/preview" => "stories#preview"
post "/stories/check_url_dupe" => "stories#check_url_dupe"

resources :comments do
resources :comments, except: [:new] do
member do
get "/comments/:id" => "comments#redirect_from_short_id"
get "reply"
post "upvote"
post "downvote"
Expand Down

0 comments on commit a58393c

Please sign in to comment.