print Brandon's poll

This commit is contained in:
Jack Wines 2023-07-06 20:06:20 -07:00
parent d4b9090839
commit d54bcedad9

View file

@ -216,7 +216,7 @@ examplePoll :: P.CreatePollInfo
examplePoll = P.CreatePollInfo {
title = Nothing,
question = "what's your favorite color?",
options = "red" LN.:| ["blue", "green", "yellow", "orange", "pink", "purple", "grey", "black"]
options = "red" LN.:| ["blue", "green", "yellow", "orange", "pink", "purple", "grey", "black", ""]
}
convertMarkdown :: FilePath -> IO T.Text
@ -238,6 +238,7 @@ main = do
M.void . liftIO $ Ac.update (db env) (DB.PostBallot (P.PollId 7) (B.Ballot ["blue", "green", "yellow", "orange", "pink"]))
M.void . liftIO $ Ac.update (db env) (DB.PostBallot (P.PollId 7) (B.Ballot ["blue", "red", "pink", "purple", "green"]))
M.void . liftIO $ Ac.update (db env) (DB.PostBallot (P.PollId 7) (B.Ballot ["purple", "black", "yellow", "orange", "blue"]))
print =<< Ac.query (db env) (DB.GetPoll (P.PollId 14836861905326358375))
mapM_ print =<< (liftIO . Ac.query (db env) $ DB.GetPollIds)
let application = serve api . hoistServer api (runWithEnv env) $ server
case opts of -- TODO: allow more command-line options like tls & domain