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:
11
app/views/post_approvals/create.js.erb
Normal file
11
app/views/post_approvals/create.js.erb
Normal file
@@ -0,0 +1,11 @@
|
||||
<% 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 %>
|
||||
Reference in New Issue
Block a user