diff options
Diffstat (limited to 'server/lib/Uplcg/Main')
-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" |