Gab Social. All are welcome.
This commit is contained in:
11
app/workers/unfavourite_worker.rb
Normal file
11
app/workers/unfavourite_worker.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class UnfavouriteWorker
|
||||
include Sidekiq::Worker
|
||||
|
||||
def perform(account_id, status_id)
|
||||
UnfavouriteService.new.call(Account.find(account_id), Status.find(status_id))
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
true
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user