posts: rework post deletion to use dialog box.

Rework post deletion from using a separate page to using a dialog box,
like flagging.

* Add `DELETE /posts/:id` endpoint.
* Remove `POST /moderator/post/posts/:id/delete` endpoint.
This commit is contained in:
evazion
2020-08-03 19:28:10 -05:00
parent f1b0e31923
commit bca1f122d0
10 changed files with 69 additions and 62 deletions

View File

@@ -13,9 +13,7 @@ Rails.application.routes.draw do
namespace :post do
resources :posts, :only => [:delete, :expunge, :confirm_delete] do
member do
get :confirm_delete
post :expunge
post :delete
get :confirm_move_favorites
post :move_favorites
get :confirm_ban
@@ -175,7 +173,7 @@ Rails.application.routes.draw do
end
resources :post_replacements, :only => [:index, :new, :create, :update]
resources :post_votes, only: [:index]
resources :posts, only: [:index, :show, :update] do
resources :posts, only: [:index, :show, :update, :destroy] do
resources :events, :only => [:index], :controller => "post_events"
resources :replacements, :only => [:index, :new, :create], :controller => "post_replacements"
resource :artist_commentary, :only => [:index, :show] do