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:
evazion
2020-01-07 11:58:45 -06:00
parent d00308c43d
commit e8efe1107f
4 changed files with 0 additions and 33 deletions

View File

@@ -1,6 +1,5 @@
class ReportsController < ApplicationController
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]
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])
respond_with(@upload_reports)
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

View File

@@ -67,7 +67,6 @@
<% 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-down-vote-report"><%= link_to "Down vote report", reports_down_voting_post_path(post_id: post.id) %></li>
<% end %>
<% end %>
<% end %>

View File

@@ -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 %>

View File

@@ -237,8 +237,6 @@ Rails.application.routes.draw do
resource :related_tag, :only => [:show, :update]
get "reports/uploads" => "reports#uploads"
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 :saved_searches, :except => [:show] do
collection do