From 05ac28f3e451c9239093f55a32e9f1eda770f8fa Mon Sep 17 00:00:00 2001 From: Ashley Date: Sat, 22 Apr 2017 12:30:35 +1200 Subject: Added API for single notification dismissal (#2251) * Added API backend for notification dismissal * Added render statement * Changed statement --- app/controllers/api/v1/notifications_controller.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/controllers/api/v1/notifications_controller.rb') diff --git a/app/controllers/api/v1/notifications_controller.rb b/app/controllers/api/v1/notifications_controller.rb index 3cff29982..e79434f1d 100644 --- a/app/controllers/api/v1/notifications_controller.rb +++ b/app/controllers/api/v1/notifications_controller.rb @@ -30,6 +30,11 @@ class Api::V1::NotificationsController < ApiController render_empty end + def dismiss + Notification.find_by!(account: current_account, id: params[:id]).destroy! + render_empty + end + private def exclude_types -- cgit