souplesse

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 4ca505ada115fd70b41b2fe2b250a2260d9edd60
parent 04797427fc3dad1af1ff081ffdf441f3ba37a2cf
Author: Daniel Barlow <dan@telent.net>
Date:   Thu,  7 Nov 2024 16:42:53 +0000

Store.save takes Track not Point

Diffstat:
Mapp/Main.hs | 2+-
Mlib/Store.hs | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/Main.hs b/app/Main.hs @@ -131,7 +131,7 @@ postUploadR = do bs <- fileSourceByteString $ fileInfo upload case Track.parseBS (fromStrict bs) of Right points -> do - runDB $ mapM_ Store.save points + runDB $ Store.save points defaultLayout [whamlet|<p>#{List.length points} points - thanks!|] Left _ -> defaultLayout diff --git a/lib/Store.hs b/lib/Store.hs @@ -66,7 +66,7 @@ toPoint entity = (trkptPower tkp) (trkptHeartRate tkp) -save p = do insert $ fromPoint p +save p = do mapM_ (insert . fromPoint) p fetch :: (MonadIO m) => UTCTime -> NominalDiffTime -> ReaderT SqlBackend m [Point] fetch start duration = do