Merge pull request #46 from turniere/ticket/TURNIERE-223
Fix group scores not serialized correctly
This commit is contained in:
commit
4e0da7f8ab
|
|
@ -9,9 +9,9 @@ class StatisticsController < ApplicationController
|
||||||
if group_stage
|
if group_stage
|
||||||
service = StatisticsService.new group_stage
|
service = StatisticsService.new group_stage
|
||||||
render json: {
|
render json: {
|
||||||
most_dominant_score: service.most_dominant_score,
|
most_dominant_score: ActiveModelSerializers::SerializableResource.new(service.most_dominant_score).as_json,
|
||||||
least_dominant_score: service.least_dominant_score,
|
least_dominant_score: ActiveModelSerializers::SerializableResource.new(service.least_dominant_score).as_json,
|
||||||
group_scores: service.group_scores
|
group_scores: ActiveModelSerializers::SerializableResource.new(service.group_scores).as_json
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
render json: {}, status: :not_implemented
|
render json: {}, status: :not_implemented
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue