0
0
Fork 0

Change percent to rate in retention metrics API (#16910)

This commit is contained in:
Claire 2022-01-23 16:01:25 +01:00 committed by GitHub
parent bddd9ba36d
commit a63495230a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View file

@ -6,7 +6,7 @@ class Admin::Metrics::Retention
end
class CohortData < ActiveModelSerializers::Model
attributes :date, :percent, :value
attributes :date, :rate, :value
end
def initialize(start_at, end_at, frequency)
@ -59,7 +59,7 @@ class Admin::Metrics::Retention
current_cohort.data << CohortData.new(
date: row['retention_period'],
percent: rate.to_f,
rate: rate.to_f,
value: value.to_s
)
end