mirror of
https://github.com/mastodon/mastodon
synced 2024-11-24 15:16:19 +09:00
Add GET /api/v1/push/subscription REST API (#7471)
* Add Api::V1::Push::SubscriptionsController#show * Add to routes
This commit is contained in:
parent
f31e58af9e
commit
97e43ec5f0
@ -20,6 +20,10 @@ class Api::V1::Push::SubscriptionsController < Api::BaseController
|
||||
render json: @web_subscription, serializer: REST::WebPushSubscriptionSerializer
|
||||
end
|
||||
|
||||
def show
|
||||
render json: @web_subscription, serializer: REST::WebPushSubscriptionSerializer
|
||||
end
|
||||
|
||||
def update
|
||||
raise ActiveRecord::RecordNotFound if @web_subscription.nil?
|
||||
|
||||
|
@ -308,7 +308,7 @@ Rails.application.routes.draw do
|
||||
end
|
||||
|
||||
namespace :push do
|
||||
resource :subscription, only: [:create, :update, :destroy]
|
||||
resource :subscription, only: [:create, :show, :update, :destroy]
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user