Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-03-19 14:35:55 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-03-19 14:35:55 +0400
commit4d378f3c9a7bec3cbdbd2b2e59150702849e65f7 (patch)
tree78883ac77ab50e0e7d2f50184010e5e10f31732e /lib/api/notes.rb
parent57f3409bcc6a4bee6bc29f8cd03f501c117655b0 (diff)
load notes for wall via api
Diffstat (limited to 'lib/api/notes.rb')
-rw-r--r--lib/api/notes.rb4
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