approvals: move post approval endpoint to /post_approvals.

Move the post approval endpoint from `POST /moderator/post/approval` to
`POST /post_approvals`.
This commit is contained in:
evazion
2020-02-20 15:37:18 -06:00
parent 610ad9e119
commit f47c56d976
10 changed files with 30 additions and 48 deletions

View File

@@ -1,11 +0,0 @@
<% if @approval.errors.any? %>
Danbooru.error("Error: " + <%= @approval.errors.full_messages.join("; ").to_json.html_safe %>);
<% else %>
if ($("#c-posts #a-show").length) {
location.reload();
} else if ($("#c-moderator-post-queues").length) {
$("#c-moderator-post-queues #post-<%= @approval.post.id %>").hide();
$(window).trigger("danbooru:modqueue_increment_processed");
Danbooru.notice("Post was approved");
}
<% end %>

View File

@@ -1,5 +1,5 @@
<div class="quick-mod">
<%= link_to_if post.is_approvable?, "Approve", moderator_post_approval_path(post_id: post.id), method: :post, remote: true, class: "approve-link btn" %> |
<%= link_to_if post.is_approvable?, "Approve", post_approvals_path(post_id: post.id), method: :post, remote: true, class: "approve-link btn" %> |
<%= link_to "Breaks Rules", post_disapprovals_path(post_disapproval: { post_id: post.id, reason: "breaks_rules" }), method: :post, remote: true, class: "disapprove-link btn" %> |
<%= link_to "Poor Quality", post_disapprovals_path(post_disapproval: { post_id: post.id, reason: "poor_quality" }), method: :post, remote: true, class: "disapprove-link btn" %> |
<%= link_to "No Interest", post_disapprovals_path(post_disapproval: { post_id: post.id, reason: "disinterest" }), method: :post, remote: true, class: "disapprove-link btn" %> |