Rooms and matchmaking debugging
* Dorm is not properly cloned (fix this) * Basic matchmaking implementation * Goto route * Goto DormRoom
This commit is contained in:
@@ -33,14 +33,30 @@ route.router.post('/room/:roomName',
|
||||
APIUtils.Authentication,
|
||||
APIUtils.AuthenticationType(AuthType.Game),
|
||||
|
||||
(rq: express.Request<MatchmakingParams>, rs: express.Response) => {
|
||||
async (rq: express.Request<MatchmakingParams>, rs: express.Response) => {
|
||||
if (!rq.params.roomName) {
|
||||
rs.json({
|
||||
errorCode: MatchmakingErrorCode.NoSuchRoom
|
||||
});
|
||||
return;
|
||||
}
|
||||
rs.json(Matchmaking.matchmake({ profile: rs.locals.profile, roomName: rq.params.roomName }));
|
||||
rs.json(await Matchmaking.matchmake({ profile: rs.locals.profile, roomName: rq.params.roomName }));
|
||||
},
|
||||
|
||||
);
|
||||
);
|
||||
route.router.post('/room/:roomName/:subRoomName',
|
||||
|
||||
APIUtils.Authentication,
|
||||
APIUtils.AuthenticationType(AuthType.Game),
|
||||
|
||||
async (rq: express.Request<MatchmakingParams>, rs: express.Response) => {
|
||||
if (!rq.params.roomName) {
|
||||
rs.json({
|
||||
errorCode: MatchmakingErrorCode.NoSuchRoom
|
||||
});
|
||||
return;
|
||||
}
|
||||
rs.json(await Matchmaking.matchmake({ profile: rs.locals.profile, roomName: rq.params.roomName, subRoomName: rq.params.subRoomName }));
|
||||
},
|
||||
|
||||
)
|
||||
Reference in New Issue
Block a user