Fix group score not serialized correctly
when returned from statistics endpoint
This commit is contained in:
parent
e281b1b23f
commit
12005b95fa
|
|
@ -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