Skip to content
This repository was archived by the owner on Apr 8, 2026. It is now read-only.

Commit 5dda4e5

Browse files
committed
fix: Update user retrieval in getUserLobby method to handle promises correctly
1 parent e32bb70 commit 5dda4e5

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

dist/services/LobbyService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ let LobbyService = class LobbyService {
5252
const rows = await this.databaseService.read("SELECT lobbyId, users FROM lobbies");
5353
for (const row of rows) {
5454
const users = await Promise.all(JSON.parse(row.users)
55-
.map((u) => this.userService.getUser(u))
55+
.map(async (u) => await this.userService.getUser(u))
5656
.map((user) => {
5757
return {
5858
username: user.username,

src/services/LobbyService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class LobbyService implements ILobbyService {
7070
for (const row of rows) {
7171
const users: (User | null)[] = await Promise.all(
7272
JSON.parse(row.users)
73-
.map((u: string) => this.userService.getUser(u))
73+
.map(async (u: string) => await this.userService.getUser(u))
7474
.map((user: User) => {
7575
return {
7676
username: user.username,

0 commit comments

Comments
 (0)