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