Skip to content

Commit

Permalink
use total users as active in days also (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
ice-cronus authored Jun 22, 2024
1 parent d8af5a8 commit 650956f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cmd/eskimo-hut/eskimo.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func (s *service) GetTopCountries( //nolint:gocritic // False negative.
// @Failure 500 {object} server.ErrorResponse
// @Failure 504 {object} server.ErrorResponse "if request times out"
// @Router /v1r/user-statistics/user-growth [GET].
func (s *service) GetUserGrowth( //nolint:gocritic // False negative.
func (s *service) GetUserGrowth( //nolint:funlen,gocritic // False negative.
ctx context.Context,
req *server.Request[GetUserGrowthArg, users.UserGrowthStatistics],
) (*server.Response[users.UserGrowthStatistics], *server.Response[server.ErrorResponse]) {
Expand All @@ -251,7 +251,12 @@ func (s *service) GetUserGrowth( //nolint:gocritic // False negative.
if err != nil {
return nil, server.Unexpected(errors.Wrapf(err, "failed to get user growth stats for: %#v", req.Data))
}
result.Total = result.Active
if true {
result.Total = result.Active
for i := range result.TimeSeries {
result.TimeSeries[i].Total = result.TimeSeries[i].Active
}
}

return server.OK(result), nil
}
Expand Down

0 comments on commit 650956f

Please sign in to comment.