logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 95bd85d9e8bd6f47b693a9ccf6733278f992fb6a
parent: 8d51ce429094d43a91d61c9cb0c0dc7b1e6bd2de
Author: TheKinrar <contact@thekinrar.fr>
Date:   Fri,  5 Jan 2018 22:38:33 +0100

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

Fixes #6197.

Diffstat:

Mapp/controllers/api/v1/instances/activity_controller.rb6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/controllers/api/v1/instances/activity_controller.rb b/app/controllers/api/v1/instances/activity_controller.rb @@ -21,9 +21,9 @@ class Api::V1::Instances::ActivityController < Api::BaseController weeks << { week: week.to_time.to_i.to_s, - statuses: Redis.current.get("activity:statuses:local:#{week_id}") || 0, - logins: Redis.current.pfcount("activity:logins:#{week_id}"), - registrations: Redis.current.get("activity:accounts:local:#{week_id}") || 0, + statuses: Redis.current.get("activity:statuses:local:#{week_id}") || '0', + logins: Redis.current.pfcount("activity:logins:#{week_id}").to_s, + registrations: Redis.current.get("activity:accounts:local:#{week_id}") || '0', } end