diff --git a/app/jobs/push_notification_job.rb b/app/jobs/push_notification_job.rb index 0dc01c56e..128cf6a18 100644 --- a/app/jobs/push_notification_job.rb +++ b/app/jobs/push_notification_job.rb @@ -4,4 +4,4 @@ class PushNotificationJob < ApplicationJob def perform(notification) NotificationPusher.new(notification).push end -end \ No newline at end of file +end diff --git a/app/models/concerns/push_notifiable.rb b/app/models/concerns/push_notifiable.rb index 5885e77e7..e497bc3fe 100644 --- a/app/models/concerns/push_notifiable.rb +++ b/app/models/concerns/push_notifiable.rb @@ -9,4 +9,4 @@ module PushNotifiable def push_notification_later PushNotificationJob.perform_later(self) end -end \ No newline at end of file +end diff --git a/app/models/notification.rb b/app/models/notification.rb index c1aa67e4d..4eaf5786b 100644 --- a/app/models/notification.rb +++ b/app/models/notification.rb @@ -1,6 +1,6 @@ class Notification < ApplicationRecord include PushNotifiable - + belongs_to :user belongs_to :creator, class_name: "User" belongs_to :source, polymorphic: true diff --git a/app/models/push.rb b/app/models/push.rb index d0ec04a37..765323c0b 100644 --- a/app/models/push.rb +++ b/app/models/push.rb @@ -2,4 +2,4 @@ module Push def self.table_name_prefix "push_" end -end \ No newline at end of file +end diff --git a/config/initializers/vapid.rb b/config/initializers/vapid.rb index 72f4d3759..2739f6ca1 100644 --- a/config/initializers/vapid.rb +++ b/config/initializers/vapid.rb @@ -1,4 +1,4 @@ Rails.application.configure do config.x.vapid.private_key = ENV.fetch("VAPID_PRIVATE_KEY", Rails.application.credentials.dig(:vapid, :private_key)) config.x.vapid.public_key = ENV.fetch("VAPID_PUBLIC_KEY", Rails.application.credentials.dig(:vapid, :public_key)) -end \ No newline at end of file +end diff --git a/db/migrate/20250714222221_add_push_subscriptions.rb b/db/migrate/20250714222221_add_push_subscriptions.rb index 5dbaa0dbc..486d975ea 100644 --- a/db/migrate/20250714222221_add_push_subscriptions.rb +++ b/db/migrate/20250714222221_add_push_subscriptions.rb @@ -7,11 +7,11 @@ class AddPushSubscriptions < ActiveRecord::Migration[8.1] t.string :auth_key t.string :user_agent t.timestamps - - t.index [:user_id, :endpoint], unique: true + + t.index [ :user_id, :endpoint ], unique: true t.index :endpoint t.index :user_agent - t.index ["endpoint", "p256dh_key", "auth_key"] + t.index [ "endpoint", "p256dh_key", "auth_key" ] end end -end \ No newline at end of file +end