Remove mod-only bulk revert system (#4178).

The mass undo system added in #4178 is a replacement for the mod-only
bulk revert system.
This commit is contained in:
evazion
2019-09-27 20:51:56 -05:00
parent 1341dbb262
commit f2dccf8cf1
12 changed files with 1 additions and 353 deletions

View File

@@ -1,35 +0,0 @@
module Moderator
class BulkRevertsController < ApplicationController
before_action :moderator_only
before_action :init_constraints
helper PostVersionsHelper
rescue_from BulkRevert::ConstraintTooGeneralError, :with => :tag_constraint_too_general
def new
end
def create
@bulk_revert = BulkRevert.new
if params[:commit] == "Test"
@bulk_revert.preview
render action: "new"
else
ProcessBulkRevertJob.perform_later(CurrentUser.user, @constraints)
flash[:notice] = "Reverts queued"
redirect_to new_moderator_bulk_revert_path
end
end
private
def init_constraints
@constraints = params[:constraints] || {}
end
def tag_constraint_too_general
flash[:notice] = "Your tag constraints are too general; try adding min and max version ids"
render action: "new"
end
end
end