Skip to content

Commit

Permalink
fix: error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanyawat-Arsaga committed Aug 16, 2024
1 parent 96cb8e7 commit 456b437
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/modules/webhook/webhook.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ export class WebhookController {
}
const { data, channel } = body;

if (!data) return;
if (!data || !channel) {
res
.status(400)
.send({ success: false, message: 'Invalid data or channel' });
return;
}

await this.push.push(
{
Expand Down

0 comments on commit 456b437

Please sign in to comment.