mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 01:01:39 -05:00
Fix stats endpoint returning null for totalPointsTracked
This commit is contained in:
parent
eb4f5d6e1b
commit
6648d9e593
2 changed files with 7 additions and 1 deletions
|
|
@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
# [UNRELEASED]
|
||||
|
||||
## Fixed
|
||||
|
||||
- `GET /api/v1/stats` endpoint now returns correct 0 instead of null if no points were tracked in the requested period.
|
||||
|
||||
# [0.33.0] - 2025-09-29
|
||||
|
||||
## Fixed
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class StatsSerializer
|
|||
def call
|
||||
{
|
||||
totalDistanceKm: total_distance_km,
|
||||
totalPointsTracked: user.points_count,
|
||||
totalPointsTracked: user.points_count.to_i,
|
||||
totalReverseGeocodedPoints: reverse_geocoded_points,
|
||||
totalCountriesVisited: user.countries_visited.count,
|
||||
totalCitiesVisited: user.cities_visited.count,
|
||||
|
|
|
|||
Loading…
Reference in a new issue