Expose votes in merge request api

Signed-off-by: Islam Amer <islam.amer@jollamobile.com>
This commit is contained in:
Islam Amer 2013-09-02 15:36:05 +00:00 committed by Jacob Vosmaer
parent 07437ac3d4
commit 29c807ced3
2 changed files with 9 additions and 1 deletions

View File

@ -20,6 +20,8 @@ Parameters:
"project_id":3,
"title":"test1",
"state":"opened",
"upvotes":0,
"downvotes":0,
"author":{
"id":1,
"username": "admin",
@ -62,6 +64,8 @@ Parameters:
"project_id":3,
"title":"test1",
"state":"merged",
"upvotes":0,
"downvotes":0,
"author":{
"id":1,
"username": "admin",
@ -106,6 +110,8 @@ Parameters:
"project_id":3,
"title":"test1",
"state":"opened",
"upvotes":0,
"downvotes":0,
"author":{
"id":1,
"username": "admin",
@ -152,6 +158,8 @@ Parameters:
"project_id":3,
"title":"test1",
"state":"opened",
"upvotes":0,
"downvotes":0,
"author":{
"id":1,
"username": "admin",

View File

@ -112,7 +112,7 @@ module API
end
class MergeRequest < Grape::Entity
expose :id, :target_branch, :source_branch, :title, :state
expose :id, :target_branch, :source_branch, :title, :state, :upvotes, :downvotes
expose :target_project_id, as: :project_id
expose :author, :assignee, using: Entities::UserBasic
end