Store.save takes Track not Point
This commit is contained in:
parent
04797427fc
commit
4ca505ada1
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user