load notes for wall via api

This commit is contained in:
Dmitriy Zaporozhets 2013-03-19 12:35:55 +02:00
parent 57f3409bcc
commit 4d378f3c9a
2 changed files with 50 additions and 0 deletions

View file

@ -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