diff options
author | Jasper Van der Jeugt | 2020-09-11 13:14:19 +0200 |
---|---|---|
committer | Jasper Van der Jeugt | 2020-09-11 13:14:19 +0200 |
commit | ffedfd5274a3545f2bc53bba7aa7ec3b4388edf1 (patch) | |
tree | 6fd9a75df6169d6abf2cc60e5658e0311d4ff20d /server/lib/Uplcg/Main | |
parent | afbd7912487499fab2b7ebcc42496f015460f4b3 (diff) |
Add default card set
Diffstat (limited to '')
-rw-r--r-- | server/lib/Uplcg/Main/Server.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/Uplcg/Main/Server.hs b/server/lib/Uplcg/Main/Server.hs index c0849fd..6527251 100644 --- a/server/lib/Uplcg/Main/Server.hs +++ b/server/lib/Uplcg/Main/Server.hs @@ -142,7 +142,7 @@ scottyApp server = Scotty.scottyApp $ do Scotty.matchAny "/rooms" $ do views <- liftIO $ roomViews server - let decks = HMS.keys $ serverCards server + let decks = serverCards server method <- Wai.requestMethod <$> Scotty.request mbCreatedRoom <- if method == HttpMethod.methodPost @@ -205,7 +205,7 @@ parsePendingConnection pending = createRoom :: Server -> RoomId -> RoomPassword -> Deck -> IO Room createRoom server rid rpw deck = do cards <- maybe (fail "Deck not found") pure $ - HMS.lookup deck (serverCards server) + HMS.lookup deck (csCards $ serverCards server) MVar.modifyMVar (serverRooms server) $ \rooms -> do case HMS.lookup rid rooms of Just _ -> fail "Room already exists" |