diff options
Diffstat (limited to 'lib/api/notes.rb')
-rw-r--r-- | lib/api/notes.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/notes.rb b/lib/api/notes.rb index 097cc7ea475..450faae535a 100644 --- a/lib/api/notes.rb +++ b/lib/api/notes.rb @@ -14,6 +14,10 @@ module Gitlab # GET /projects/:id/notes get ":id/notes" do @notes = user_project.notes.common + + # Get recent notes if recent = true + @notes = @notes.order('id DESC') if params[:recent] + present paginate(@notes), with: Entities::Note end |