mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-02-15 16:05:00 +00:00
12 lines
245 B
Ruby
12 lines
245 B
Ruby
|
|
module Jobs
|
|
class DonationUser < ::Jobs::Base
|
|
def execute(args)
|
|
user = User.create!(args)
|
|
if args[:rewards].present?
|
|
DiscourseDonations::Rewards.new(user).grant_badge(args[:rewards][:name])
|
|
end
|
|
end
|
|
end
|
|
end
|