diff options
author | Adam Niedzielski <adamsunday@gmail.com> | 2017-02-07 20:02:02 +0300 |
---|---|---|
committer | Adam Niedzielski <adamsunday@gmail.com> | 2017-03-01 18:34:28 +0300 |
commit | 0a31efb57768345e2b3350a493021a26b54994a3 (patch) | |
tree | 6971509949fc7024c9a431e03160068b19e6d24a /app/controllers/projects/notes_controller.rb | |
parent | 57c068e169381565488d9430431a7202399507f0 (diff) |
Remove query parameters from notes polling endpoint to make caching easier
Diffstat (limited to 'app/controllers/projects/notes_controller.rb')
-rw-r--r-- | app/controllers/projects/notes_controller.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/projects/notes_controller.rb b/app/controllers/projects/notes_controller.rb index 5cf3a7f593b..d00177e7612 100644 --- a/app/controllers/projects/notes_controller.rb +++ b/app/controllers/projects/notes_controller.rb @@ -211,6 +211,11 @@ class Projects::NotesController < Projects::ApplicationController end def find_current_user_notes - @notes = NotesFinder.new(project, current_user, params).execute.inc_author + @notes = NotesFinder.new(project, current_user, params.merge(last_fetched_at: last_fetched_at)) + .execute.inc_author + end + + def last_fetched_at + request.headers['X-Last-Fetched-At'] end end |