1 # frozen_string_literal: true
3 class NotificationsController < ApplicationController
4 include PaginationMethods
6 LISTABLE_NOTIFICATIONS = %w[
7 ChangesetCommentNotifier::Notification
8 DiaryCommentNotifier::Notification
9 GpxImportFailureNotifier::Notification
10 GpxImportSuccessNotifier::Notification
11 NewFollowerNotifier::Notification
12 NoteCommentNotifier::Notification
17 before_action :authorize_web
18 before_action :set_locale
20 authorize_resource :class => false
22 before_action :check_database_readable
25 notifications = current_user.notifications.where(:type => LISTABLE_NOTIFICATIONS)
26 @notifications = get_page_items(notifications)
27 @params = params.permit