Files
danbooru/app/controllers/post_approvals_controller.rb
evazion cded0f763b approvers: remove "you haven't moderated in awhile" notice.
Remove the nag message when an approver hasn't approved anything
recently. Also remove the modqueue random posts page. As of 3d410398a,
inactive approvers are now warned via dmails.
2020-02-28 14:28:08 -06:00

18 lines
469 B
Ruby

class PostApprovalsController < ApplicationController
before_action :approver_only, only: [:create]
respond_to :html, :xml, :json, :js
def create
post = Post.find(params[:post_id])
@approval = post.approve!
respond_with(@approval)
end
def index
@post_approvals = PostApproval.paginated_search(params)
@post_approvals = @post_approvals.includes(:user, post: :uploader) if request.format.html?
respond_with(@post_approvals)
end
end