add support for post version queries

This commit is contained in:
r888888888
2016-06-21 13:14:27 -07:00
parent 145229c49f
commit 2ce86ecb8b
9 changed files with 87 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
module Reports
class PostVersionsAdded
attr_reader :tag, :email
def initialize(tag, email)
@tag = tag
@email = email
end
def process!
if tag
json = {"type" => "post_versions_added", "tag" => tag, "email" => email}.to_json
SqsService.new(Danbooru.config.aws_sqs_post_versions_url).send_message(json)
end
end
end
end

View File

@@ -0,0 +1,17 @@
module Reports
class PostVersionsRemoved
attr_reader :tag, :email
def initialize(tag, email)
@tag = tag
@email = email
end
def process!
if tag
json = {"type" => "post_versions_removed", "tag" => tag, "email" => email}.to_json
SqsService.new(Danbooru.config.aws_sqs_post_versions_url).send_message(json)
end
end
end
end