Use serializable_hash for compared results

This commit is contained in:
Shinya Maeda 2018-08-03 17:31:03 +09:00
parent c8f13cc5bd
commit c53de19ff8
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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 }