logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 3a4b5961bea66681ba9c455fcfd3ec497bfaed2f
parent: deedf133d386d388da146c9fc24659b361ef1c49
Author: Eugen Rochko <eugen@zeonfederated.com>
Date:   Sat, 21 Jan 2017 22:14:13 +0100

Method to fetch a single notification

Diffstat:

Mapp/controllers/api/v1/notifications_controller.rb4++++
Mconfig/routes.rb2+-
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/app/controllers/api/v1/notifications_controller.rb b/app/controllers/api/v1/notifications_controller.rb @@ -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 diff --git a/config/routes.rb b/config/routes.rb @@ -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