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
Method to fetch a single notification
closed-social-glitch-2
Eugen Rochko
7 years ago
parent
deedf133d3
commit
3a4b5961be
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/notifications_controller.rb
+1
-1
config/routes.rb
+ 4
- 0
app/controllers/api/v1/notifications_controller.rb
View File
@ -20,4 +20,8 @@ class Api::V1::NotificationsController < ApiController
set_pagination_headers
(
next_path
,
prev_path
)
end
def
show
@notification
=
Notification
.
where
(
account
:
current_account
)
.
find
(
params
[
:id
]
)
end
end
+ 1
- 1
config/routes.rb
View File
@ -114,7 +114,7 @@ Rails.application.routes.draw do
end
end
resources
:notifications
,
only
:
[
:index
]
resources
:notifications
,
only
:
[
:index
,
:show
]
resources
:favourites
,
only
:
[
:index
]
resources
:accounts
,
only
:
[
:show
]
do
Write
Preview
Loading…
Cancel
Save