mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
sidekiq provides string keys not symbols
This commit is contained in:
parent
6d237600fd
commit
7e49bd96a4
1 changed files with 8 additions and 10 deletions
|
@ -4,26 +4,24 @@ class StopForumSpamWorker
|
||||||
|
|
||||||
def perform(opts)
|
def perform(opts)
|
||||||
txn = Minfraud::Components::Report::Transaction.new(
|
txn = Minfraud::Components::Report::Transaction.new(
|
||||||
ip_address: opts[:ip],
|
ip_address: opts['ip'],
|
||||||
tag: :spam_or_abuse,
|
tag: :spam_or_abuse,
|
||||||
# The following key/values are not mandatory but are encouraged
|
# The following key/values are not mandatory but are encouraged
|
||||||
maxmind_id: $config['minfraud_account_id'],
|
#maxmind_id: 'noideawhatthisis',
|
||||||
#minfraud_id: '01c25cb0-f067-4e02-8ed0-a094c580f5e4',
|
#minfraud_id: '01c25cb0-f067-4e02-8ed0-a094c580f5e4',
|
||||||
#transaction_id: 'txn123'
|
#transaction_id: 'txn123'
|
||||||
#chargeback_code: 'BL'
|
#chargeback_code: 'BL'
|
||||||
notes: opts[:classifier]
|
notes: opts['classifier']
|
||||||
)
|
)
|
||||||
|
|
||||||
reporter = Minfraud::Report.new transaction: txn
|
reporter = Minfraud::Report.new transaction: txn
|
||||||
res = reporter.report_transaction
|
reporter.report_transaction
|
||||||
puts res.inspect
|
|
||||||
|
|
||||||
res = HTTP.post 'https://stopforumspam.com/add', form: {
|
HTTP.post 'https://stopforumspam.com/add', form: {
|
||||||
api_key: $config['stop_forum_spam_api_key'],
|
api_key: $config['stop_forum_spam_api_key'],
|
||||||
username: opts[:username],
|
username: opts['username'],
|
||||||
email: opts[:email],
|
email: opts['email'],
|
||||||
ip: opts[:ip]
|
ip: opts['ip']
|
||||||
}
|
}
|
||||||
puts res.inspect
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue