We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5e3e9d commit fc3bee5Copy full SHA for fc3bee5
backend/gateway-service/src/modules/match/match.controller.ts
@@ -70,7 +70,12 @@ export class MatchGateway implements OnGatewayInit {
70
@MessageBody() payload: MatchRequestDto,
71
) {
72
const { userId, selectedTopic, selectedDifficulty } = payload;
73
- if (!userId || !selectedTopic || !selectedDifficulty) {
+ if (
74
+ !userId ||
75
+ !selectedTopic ||
76
+ !selectedDifficulty ||
77
+ selectedTopic.length === 0
78
+ ) {
79
client.emit(MATCH_ERROR, 'Invalid match request payload.');
80
return;
81
}
0 commit comments