Commit c53de19f authored by Shinya Maeda's avatar Shinya Maeda

Use serializable_hash for compared results

parent c8f13cc5
...@@ -108,7 +108,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo ...@@ -108,7 +108,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
when :parsing when :parsing
render json: '', status: :no_content render json: '', status: :no_content
when :parsed when :parsed
render json: result[:data], status: :ok render json: result[:data].to_json, status: :ok
when :error when :error
render json: { status_reason: result[:status_reason] }, status: :bad_request render json: { status_reason: result[:status_reason] }, status: :bad_request
else else
......
...@@ -14,7 +14,7 @@ module Ci ...@@ -14,7 +14,7 @@ module Ci
status: :parsed, status: :parsed,
data: TestReportsComparerSerializer data: TestReportsComparerSerializer
.new(project: project) .new(project: project)
.represent(comparer).to_json .represent(comparer).as_json
} }
rescue => e rescue => e
{ status: :error, status_reason: e.message } { status: :error, status_reason: e.message }
......
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