diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-08-02 11:34:56 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-08-02 11:34:56 +0100 |
commit | 6d50b7529bcb1720aad34f9de90c2140b2744204 (patch) | |
tree | 004efef0bd01f79f3fc8e37e22bd6d9444b2468b /app/controllers/concerns/notes_actions.rb | |
parent | 7a98970bd84b8f42bc117040cc284a73cbf03a8a (diff) | |
download | gitlab-ce-6d50b7529bcb1720aad34f9de90c2140b2744204.tar.gz |
[ci skip] Enable etag polling
Diffstat (limited to 'app/controllers/concerns/notes_actions.rb')
-rw-r--r-- | app/controllers/concerns/notes_actions.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/concerns/notes_actions.rb b/app/controllers/concerns/notes_actions.rb index 3f86a067229..0f90137ad3d 100644 --- a/app/controllers/concerns/notes_actions.rb +++ b/app/controllers/concerns/notes_actions.rb @@ -3,6 +3,7 @@ module NotesActions extend ActiveSupport::Concern included do + before_action :set_polling_interval_header, only: [:index] before_action :authorize_admin_note!, only: [:update, :destroy] before_action :note_project, only: [:create] end @@ -175,6 +176,12 @@ module NotesActions ) end + def set_polling_interval_header + return unless noteable.is_a?(Issue) + + Gitlab::PollingInterval.set_header(response, interval: 3_000) + end + def noteable @noteable ||= notes_finder.target end |