Remove targeted down voting report.
Remove the targeted down voting report. This report hasn't been working for a while. The /post_votes page is a better way to investigate downvoting activity anyway.
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
class ReportsController < ApplicationController
|
class ReportsController < ApplicationController
|
||||||
before_action :member_only, :except => [:upload_tags]
|
before_action :member_only, :except => [:upload_tags]
|
||||||
before_action :moderator_only, :only => [:down_voting_post_report, :down_voting_post_report_create]
|
|
||||||
respond_to :html, :xml, :json, only: [:upload_tags]
|
respond_to :html, :xml, :json, only: [:upload_tags]
|
||||||
|
|
||||||
def uploads
|
def uploads
|
||||||
@@ -12,16 +11,4 @@ class ReportsController < ApplicationController
|
|||||||
@upload_reports = Reports::UploadTags.includes(versions: { post: :versions }).for_user(params[:user_id]).order("id desc").paginate(params[:page], :limit => params[:limit])
|
@upload_reports = Reports::UploadTags.includes(versions: { post: :versions }).for_user(params[:user_id]).order("id desc").paginate(params[:page], :limit => params[:limit])
|
||||||
respond_with(@upload_reports)
|
respond_with(@upload_reports)
|
||||||
end
|
end
|
||||||
|
|
||||||
def down_voting_post
|
|
||||||
end
|
|
||||||
|
|
||||||
def down_voting_post_create
|
|
||||||
user_id = CurrentUser.id
|
|
||||||
post_id = params[:post_id].to_i
|
|
||||||
sqs = SqsService.new(Danbooru.config.aws_sqs_async_reports)
|
|
||||||
sqs.send_message("targetedpostdownvoting-#{user_id}-#{post_id}")
|
|
||||||
flash[:notice] = "You will be messaged when the report has finished generating"
|
|
||||||
redirect_to reports_down_voting_post_path
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -67,7 +67,6 @@
|
|||||||
|
|
||||||
<% if CurrentUser.is_moderator? %>
|
<% if CurrentUser.is_moderator? %>
|
||||||
<li id="post-option-replace-image"><%= link_to "Replace image", new_post_replacement_path(post_id: post.id), remote: true %></li>
|
<li id="post-option-replace-image"><%= link_to "Replace image", new_post_replacement_path(post_id: post.id), remote: true %></li>
|
||||||
<li id="post-option-down-vote-report"><%= link_to "Down vote report", reports_down_voting_post_path(post_id: post.id) %></li>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
<div id="c-reports">
|
|
||||||
<div id="a-down-voting-post">
|
|
||||||
<h1>Down Voting Post Report</h1>
|
|
||||||
|
|
||||||
<p>This report uses stastistical analysis to determine if a user's uploads are being targeted by an attacker. It will take some time to generate so you will receive a DMail with the results when it finishes.</p>
|
|
||||||
|
|
||||||
<%= form_tag(reports_down_voting_post_create_path) do %>
|
|
||||||
<%= hidden_field_tag "post_id", params[:post_id] %>
|
|
||||||
<%= submit_tag "Build" %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<% content_for(:page_title) do %>
|
|
||||||
Down Voting Post Report - <%= Danbooru.config.app_name %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
@@ -237,8 +237,6 @@ Rails.application.routes.draw do
|
|||||||
resource :related_tag, :only => [:show, :update]
|
resource :related_tag, :only => [:show, :update]
|
||||||
get "reports/uploads" => "reports#uploads"
|
get "reports/uploads" => "reports#uploads"
|
||||||
get "reports/upload_tags" => "reports#upload_tags"
|
get "reports/upload_tags" => "reports#upload_tags"
|
||||||
get "reports/down_voting_post" => "reports#down_voting_post"
|
|
||||||
post "reports/down_voting_post_create" => "reports#down_voting_post_create"
|
|
||||||
resources :recommended_posts, only: [:index]
|
resources :recommended_posts, only: [:index]
|
||||||
resources :saved_searches, :except => [:show] do
|
resources :saved_searches, :except => [:show] do
|
||||||
collection do
|
collection do
|
||||||
|
|||||||
Reference in New Issue
Block a user