Skip to content

Commit

Permalink
Update webhook.service.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ericboucher committed Sep 24, 2024
1 parent 68f0659 commit 12cf1b6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions apps/backend/src/modules/webhook/webhook.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ export class WebhookService {
throw new Error('telegramNcdmChatId is not defined');
}

console.log(JSON.stringify(form));

const text = generateTelegramMessage(disasterType, form);

await Promise.all([
Expand All @@ -46,7 +44,8 @@ export class WebhookService {

return 'sent';
} catch (error) {
console.error('Error sending alerts:', error);
console.log(JSON.stringify(form));
console.error('Error sending alerts:', JSON.stringify(error));
throw new HttpException('Failed to send alerts', HttpStatus.INTERNAL_SERVER_ERROR);
}
}
Expand Down

0 comments on commit 12cf1b6

Please sign in to comment.