fix: wait for promise
This commit is contained in:
parent
da7542601f
commit
45845c7bac
|
@ -35,7 +35,7 @@ export default {
|
||||||
const {req} = socket;
|
const {req} = socket;
|
||||||
const {User} = allModels();
|
const {User} = allModels();
|
||||||
await userJoin(channel, socket.socket);
|
await userJoin(channel, socket.socket);
|
||||||
const state = channelState(req, channel);
|
const state = await channelState(req, channel);
|
||||||
const entries = await Promise.all(
|
const entries = await Promise.all(
|
||||||
state.users.map(async (id) => [id, (await User.findByPk(id)).redditUsername]),
|
state.users.map(async (id) => [id, (await User.findByPk(id)).redditUsername]),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user