mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-02-22 04:30:33 +09:00
14 lines
457 B
Ruby
14 lines
457 B
Ruby
class Users::PushSubscriptions::TestNotificationsController < ApplicationController
|
|
before_action :set_push_subscription
|
|
|
|
def create
|
|
@push_subscription.notification(title: "Campfire Test", body: Random.uuid, path: user_push_subscriptions_url).deliver
|
|
redirect_to user_push_subscriptions_url
|
|
end
|
|
|
|
private
|
|
def set_push_subscription
|
|
@push_subscription = Current.user.push_subscriptions.find(params[:push_subscription_id])
|
|
end
|
|
end
|