Restore remainder of endpoints to compiling status.
[?]
Jan 20, 2015, 6:11 PM
EYGIUUQZSCUCLEF6IFIN6RD3TCSOTTSQEQ2SV7OJRVVNFE6NJQPQCDependencies
- [2]
TNR3TEHKSwitch to Postgres + snaplet arch compiles. - [3]
WFZDMVUXRename ADB -> QDB - [4]
ADMKQQGCInitial empty Snap project. - [5]
64VI73NPServer now compiles using abstracted SQLite - [6]
7XN3I3QJAdd 'loggedIntervals' endpoint. - [7]
IZEVQF62Work in progress replacing sqlite with postgres. - [8]
MK7ODWHUSome minor renaming. - [*]
Z3M53KTLAdrift. - [*]
2Y2QZFVFSwitch to more modern cabal2nix-based workflow. - [*]
64C6AWH6Rename Ananke -> Quixotic, project reboot.
Change contents
- edit in server/Main.hs at line 15
import qualified Data.Aeson as A - edit in server/Main.hs at line 18
import Data.Map - edit in server/Main.hs at line 24[3.7661][12.2543]
import Quixotic.Json - edit in server/Main.hs at line 109
-- | FIXME, make configurabledepf :: DepFdepf = linearDepreciation (Months 6) (Months 60) - replacement in server/Main.hs at line 142
--loggedIntervalsHandler :: QDB IO a -> ReaderT a Snap ()--loggedIntervalsHandler qdb = do-- let QDB{..} = qdb-- widx <- mapReaderT liftIO $ readWorkIndex-- lift . modifyResponse $ addHeader "content-type" "application/json"-- lift . writeLBS . A.encode $ mapKeys (^. address) widx----payoutsHandler :: QDB IO a -> ReaderT a Snap ()--payoutsHandler qdb = do-- let QDB{..} = qdb-- dep = linearDepreciation (Months 6) (Months 60)-- ptime <- lift . liftIO $ getCurrentTime-- widx <- mapReaderT liftIO $ readWorkIndex-- lift . modifyResponse $ addHeader "content-type" "application/json"-- lift . writeLBS . A.encode . PayoutsResponse $ payouts dep ptime widxloggedIntervalsHandler :: Handler App App ()loggedIntervalsHandler = requireLogin $ doQDB{..} <- with qdb getwidx <- liftPG $ runReaderT readWorkIndexmodifyResponse $ addHeader "content-type" "application/json"writeLBS . A.encode $ mapKeys (^. address) widx - edit in server/Main.hs at line 149
payoutsHandler :: Handler App App ()payoutsHandler = requireLogin $ doQDB{..} <- with qdb getptime <- liftIO $ getCurrentTimewidx <- liftPG $ runReaderT readWorkIndexmodifyResponse $ addHeader "content-type" "application/json"writeLBS . A.encode . PayoutsResponse $ payouts depf ptime widx