Skip to content
Extraits de code Groupes Projets
Valider 05ac28f3 rédigé par Ashley's avatar Ashley Validation de Eugen
Parcourir les fichiers

Added API for single notification dismissal (#2251)

* Added API backend for notification dismissal

* Added render statement

* Changed statement
parent 0f852c6f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -30,6 +30,11 @@ class Api::V1::NotificationsController < ApiController ...@@ -30,6 +30,11 @@ class Api::V1::NotificationsController < ApiController
render_empty render_empty
end end
def dismiss
Notification.find_by!(account: current_account, id: params[:id]).destroy!
render_empty
end
private private
def exclude_types def exclude_types
......
...@@ -148,6 +148,7 @@ Rails.application.routes.draw do ...@@ -148,6 +148,7 @@ Rails.application.routes.draw do
resources :notifications, only: [:index, :show] do resources :notifications, only: [:index, :show] do
collection do collection do
post :clear post :clear
post :dismiss
end end
end end
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter