Merge pull request #3111 from evazion/fix-3099
Fix #3099: NilClass error for approval API request
This commit is contained in:
@@ -8,7 +8,7 @@ $("#c-posts #approve").hide();
|
||||
$("#c-posts #disapprove").hide();
|
||||
$("#c-posts #flag").show();
|
||||
|
||||
$("#pending-approval-notice").hide();
|
||||
$("#pending-approval-notice, .notice-flagged, .notice-appealed").hide();
|
||||
|
||||
$("#c-moderator-post-queues #post-<%= @approval.post.id %>").hide();
|
||||
Danbooru.notice("Post was approved");
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
{"success": <%= @post.errors.empty? %>, "reason": <%= raw @post.errors.full_messages.join("; ").to_json %>}
|
||||
@@ -43,7 +43,7 @@
|
||||
<% if CurrentUser.can_approve_posts? && !post.disapproved_by?(CurrentUser.user) %>
|
||||
<div class="quick-mod">
|
||||
<% unless post.is_status_locked? %>
|
||||
<%= link_to "Approve", moderator_post_approval_path(:post_id => post.id), :method => :post, :remote => true, :class => "btn" %> |
|
||||
<%= link_to "Approve", moderator_post_approval_path(:post_id => post.id), :id => "quick-mod-approve", :method => :post, :remote => true, :class => "btn" %> |
|
||||
<% end %>
|
||||
<%= link_to "Breaks Rules", moderator_post_disapproval_path(:post_id => post.id, :reason => "breaks_rules"), :method => :post, :remote => true, :class => "btn" %> |
|
||||
<%= link_to "Poor Quality", moderator_post_disapproval_path(:post_id => post.id, :reason => "poor_quality"), :method => :post, :remote => true, :class => "btn" %> |
|
||||
|
||||
Reference in New Issue
Block a user