Limita una diretta attiva per account e valorizza la copertina Premium Full.
Blocca la seconda diretta sullo stesso utente, registra gli abusi in admin e presenta la copertina come grafica caricata dalla società, con demo Team MLTV. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Admin
|
||||
class StreamConcurrencyViolationsController < Admin::BaseController
|
||||
def index
|
||||
@filters = {
|
||||
q: params[:q].to_s.strip.presence,
|
||||
devices_differ: params[:devices_differ].to_s == "1"
|
||||
}
|
||||
scope = StreamConcurrencyViolation.recent
|
||||
if @filters[:q]
|
||||
term = "%#{ActiveRecord::Base.sanitize_sql_like(@filters[:q])}%"
|
||||
scope = scope.where(
|
||||
"user_email ILIKE :term OR user_name ILIKE :term OR occupying_club_name ILIKE :term OR attempted_club_name ILIKE :term OR occupying_match_label ILIKE :term OR attempted_match_label ILIKE :term",
|
||||
term: term
|
||||
)
|
||||
end
|
||||
scope = scope.two_devices if @filters[:devices_differ]
|
||||
@total_count = scope.count
|
||||
@violations = scope.limit(200)
|
||||
@lookback_count = StreamConcurrencyViolation.lookback.count
|
||||
@two_devices_count = StreamConcurrencyViolation.lookback.two_devices.count
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user