about summary refs log tree commit diff
path: root/app/controllers/api/web
diff options
context:
space:
mode:
authorabcang <abcang1015@gmail.com>2017-12-09 10:31:37 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-12-09 02:31:37 +0100
commit99242b92bcc1965b2a72c01216bce7c232322f15 (patch)
tree708cb3769f5748e753a9d203f26652b1c2ecdff6 /app/controllers/api/web
parentec3b449baa122cb881556422f1b3d586ad5a9a6c (diff)
Keep WebPush settings (#5879)
Diffstat (limited to 'app/controllers/api/web')
-rw-r--r--app/controllers/api/web/push_subscriptions_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/api/web/push_subscriptions_controller.rb b/app/controllers/api/web/push_subscriptions_controller.rb
index d66237feb..52e250d02 100644
--- a/app/controllers/api/web/push_subscriptions_controller.rb
+++ b/app/controllers/api/web/push_subscriptions_controller.rb
@@ -28,6 +28,8 @@ class Api::Web::PushSubscriptionsController < Api::BaseController
       },
     }
 
+    data.deep_merge!(params[:data]) if params[:data]
+
     web_subscription = ::Web::PushSubscription.create!(
       endpoint: params[:subscription][:endpoint],
       key_p256dh: params[:subscription][:keys][:p256dh],