API for apps to register for push notifications
This commit is contained in:
parent
1992575d57
commit
3f075c7794
13 changed files with 112 additions and 2 deletions
11
app/workers/push_notification_worker.rb
Normal file
11
app/workers/push_notification_worker.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class PushNotificationWorker
|
||||
include Sidekiq::Worker
|
||||
|
||||
def perform(notification_id)
|
||||
SendPushNotificationService.new.call(Notification.find(notification_id))
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
true
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue