This website works better with JavaScript.
Home
Explore
Help
Sign In
closed-social
/
mastodon
Watch
3
Star
0
Fork
2
Code
Issues
5
Pull Requests
0
Projects
0
Releases
3
Wiki
Activity
Browse Source
Add GET /api/v1/push/subscription REST API (
#7471
)
* Add Api::V1::Push::SubscriptionsController#show * Add to routes
pull/4/head
Eugen Rochko
6 years ago
committed by
GitHub
parent
f31e58af9e
commit
97e43ec5f0
No known key found for this signature in database
GPG Key ID:
4AEE18F83AFDEB23
2 changed files
with
5 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+4
-0
app/controllers/api/v1/push/subscriptions_controller.rb
+1
-1
config/routes.rb
+ 4
- 0
app/controllers/api/v1/push/subscriptions_controller.rb
View File
@ -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?
+ 1
- 1
config/routes.rb
View File
@ -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
Write
Preview
Loading…
Cancel
Save