From 4d378f3c9a7bec3cbdbd2b2e59150702849e65f7 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 19 Mar 2013 12:35:55 +0200 Subject: load notes for wall via api --- lib/api/notes.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/api') 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 -- cgit v1.2.1