This commit is contained in:
2026-03-23 21:13:38 +08:00
parent 5210b8309f
commit 632a0267a4
4 changed files with 498 additions and 76 deletions

View File

@@ -7,6 +7,11 @@ export interface RoomItem {
owner_id: string
max_players: number
player_count: number
players?: Array<{
index: number
player_id: string
ready: boolean
}>
status: string
created_at: string
updated_at: string
@@ -58,8 +63,8 @@ export async function joinRoom(
auth: AuthSession,
input: { roomId: string },
onAuthUpdated?: (next: AuthSession) => void,
): Promise<void> {
await authedRequest<Record<string, never> | RoomItem>({
): Promise<RoomItem> {
return authedRequest<RoomItem>({
method: 'POST',
path: ROOM_JOIN_PATH,
auth,