Represent numbers by strings in instance activity API (#6198)

Fixes #6197.
lolsob-rspec
TheKinrar 2018-01-05 22:38:33 +01:00 committed by Eugen Rochko
parent 3bc13de62f
commit 3491c5e145
1 changed files with 3 additions and 3 deletions

View File

@ -21,9 +21,9 @@ class Api::V1::Instances::ActivityController < Api::BaseController
weeks << { weeks << {
week: week.to_time.to_i.to_s, week: week.to_time.to_i.to_s,
statuses: Redis.current.get("activity:statuses:local:#{week_id}") || 0, statuses: Redis.current.get("activity:statuses:local:#{week_id}") || '0',
logins: Redis.current.pfcount("activity:logins:#{week_id}"), logins: Redis.current.pfcount("activity:logins:#{week_id}").to_s,
registrations: Redis.current.get("activity:accounts:local:#{week_id}") || 0, registrations: Redis.current.get("activity:accounts:local:#{week_id}") || '0',
} }
end end