fix: join destructure
This commit is contained in:
parent
a4e30c0424
commit
2d2afe21b6
|
@ -24,12 +24,12 @@ export const userJoin = async (channel, socket) => {
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
Packet: Join,
|
Packet: Join,
|
||||||
validator: async () => {
|
validator: async ({data: {channel}}) => {
|
||||||
if (!validateChannel()) {
|
if (!validateChannel(channel)) {
|
||||||
throw new ValidationError({code: 400, reason: 'Malformed channel'});
|
throw new ValidationError({code: 400, reason: 'Malformed channel'});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
responder: async ({data: channel}, socket) => {
|
responder: async ({data: {channel}}, socket) => {
|
||||||
const {req} = socket;
|
const {req} = socket;
|
||||||
await userJoin(channel, socket.socket);
|
await userJoin(channel, socket.socket);
|
||||||
return channelState(req, channel);
|
return channelState(req, channel);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user