Commit 29c807ce authored by Islam Amer's avatar Islam Amer Committed by Jacob Vosmaer

Expose votes in merge request api

Signed-off-by: default avatarIslam Amer <islam.amer@jollamobile.com>
parent 07437ac3
...@@ -20,6 +20,8 @@ Parameters: ...@@ -20,6 +20,8 @@ Parameters:
"project_id":3, "project_id":3,
"title":"test1", "title":"test1",
"state":"opened", "state":"opened",
"upvotes":0,
"downvotes":0,
"author":{ "author":{
"id":1, "id":1,
"username": "admin", "username": "admin",
...@@ -62,6 +64,8 @@ Parameters: ...@@ -62,6 +64,8 @@ Parameters:
"project_id":3, "project_id":3,
"title":"test1", "title":"test1",
"state":"merged", "state":"merged",
"upvotes":0,
"downvotes":0,
"author":{ "author":{
"id":1, "id":1,
"username": "admin", "username": "admin",
...@@ -106,6 +110,8 @@ Parameters: ...@@ -106,6 +110,8 @@ Parameters:
"project_id":3, "project_id":3,
"title":"test1", "title":"test1",
"state":"opened", "state":"opened",
"upvotes":0,
"downvotes":0,
"author":{ "author":{
"id":1, "id":1,
"username": "admin", "username": "admin",
...@@ -152,6 +158,8 @@ Parameters: ...@@ -152,6 +158,8 @@ Parameters:
"project_id":3, "project_id":3,
"title":"test1", "title":"test1",
"state":"opened", "state":"opened",
"upvotes":0,
"downvotes":0,
"author":{ "author":{
"id":1, "id":1,
"username": "admin", "username": "admin",
......
...@@ -112,7 +112,7 @@ module API ...@@ -112,7 +112,7 @@ module API
end end
class MergeRequest < Grape::Entity 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 :target_project_id, as: :project_id
expose :author, :assignee, using: Entities::UserBasic expose :author, :assignee, using: Entities::UserBasic
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment