From d54bcedad9f582dc8523aa8c8126651d46f044de Mon Sep 17 00:00:00 2001 From: Jack Wines Date: Thu, 6 Jul 2023 20:06:20 -0700 Subject: [PATCH] print Brandon's poll --- src/Main.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Main.hs b/src/Main.hs index 560d933..4528fb8 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -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