diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-03-19 12:35:55 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-03-19 12:35:55 +0200 |
commit | 4d378f3c9a7bec3cbdbd2b2e59150702849e65f7 (patch) | |
tree | 78883ac77ab50e0e7d2f50184010e5e10f31732e /lib/api | |
parent | 57f3409bcc6a4bee6bc29f8cd03f501c117655b0 (diff) | |
download | gitlab-ce-4d378f3c9a7bec3cbdbd2b2e59150702849e65f7.tar.gz |
load notes for wall via api
Diffstat (limited to 'lib/api')
-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 |