approvals: remove post undelete endpoint.

Remove `POST /moderator/post/undelete` endpoint. Replace it with
`POST /post_approvals` instead.

Fixes it so that undeleting a post has the same behavior as approving a
post. Namely, it reloads the page instead of just flashing a "Post was
undeleted" message.
This commit is contained in:
evazion
2020-02-20 15:46:39 -06:00
parent f47c56d976
commit faf852d18e
6 changed files with 20 additions and 31 deletions

View File

@@ -35,20 +35,6 @@ module Moderator
end
end
context "undelete action" do
should "render" do
as_user do
@post.update(is_deleted: true)
end
assert_difference(-> { PostApproval.count }, 1) do
post_auth undelete_moderator_post_post_path(@post), @admin, params: {:format => "js"}
end
assert_response :success
assert(!@post.reload.is_deleted?)
end
end
context "confirm_move_favorites action" do
should "render" do
get_auth confirm_ban_moderator_post_post_path(@post), @admin