Expose serialized pipelines API for merge requests
This commit is contained in:
parent
1ad6b3696b
commit
3cb37c0349
|
@ -214,7 +214,16 @@ class Projects::MergeRequestsController < Projects::ApplicationController
|
|||
|
||||
render 'show'
|
||||
end
|
||||
format.json { render json: { html: view_to_html_string('projects/merge_requests/show/_pipelines') } }
|
||||
|
||||
format.json do
|
||||
render json: {
|
||||
html: view_to_html_string('projects/merge_requests/show/_pipelines'),
|
||||
pipelines: PipelineSerializer
|
||||
.new(project: @project, user: @current_user)
|
||||
.with_pagination(request, response)
|
||||
.represent(@pipelines)
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue