From e111a323f7e2568b269439e3fa72b1391468c822 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Wed, 6 Nov 2024 19:13:47 +0000 Subject: [PATCH] add cadence/power/hr to json --- lib/Store.hs | 6 +++--- lib/Track.hs | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/Store.hs b/lib/Store.hs index 503390f..fa67872 100644 --- a/lib/Store.hs +++ b/lib/Store.hs @@ -61,9 +61,9 @@ toPoint entity = in Point pos (trkptTime tkp) - Nothing - Nothing - Nothing + (trkptCadence tkp) + (trkptPower tkp) + (trkptHeartRate tkp) save p = do insert $ fromPoint p diff --git a/lib/Track.hs b/lib/Track.hs index d5c0224..7f12e1c 100644 --- a/lib/Track.hs +++ b/lib/Track.hs @@ -58,7 +58,10 @@ instance ToJSON Point where toJSON Point {..} = object [ "pos" .= pos, - "time" .= time + "time" .= time, + "cadence" .= cadence, + "power" .= power, + "heartRate" .= heartRate ] -- TODO do we even need this type?