Use serializable_hash for compared results
This commit is contained in:
parent
c8f13cc5bd
commit
c53de19ff8
|
@ -108,7 +108,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
|
|||
when :parsing
|
||||
render json: '', status: :no_content
|
||||
when :parsed
|
||||
render json: result[:data], status: :ok
|
||||
render json: result[:data].to_json, status: :ok
|
||||
when :error
|
||||
render json: { status_reason: result[:status_reason] }, status: :bad_request
|
||||
else
|
||||
|
|
|
@ -14,7 +14,7 @@ module Ci
|
|||
status: :parsed,
|
||||
data: TestReportsComparerSerializer
|
||||
.new(project: project)
|
||||
.represent(comparer).to_json
|
||||
.represent(comparer).as_json
|
||||
}
|
||||
rescue => e
|
||||
{ status: :error, status_reason: e.message }
|
||||
|
|
Loading…
Reference in New Issue