📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
Added webhook to get updates
Yevhenii Kulisidia8f3d2194d6b
diff --git a/src/integrations/telegram/telegram.controller.ts b/src/integrations/telegram/telegram.controller.tsnew file mode 100644index 000000000..6ebe5635d--- /dev/null+++ b/src/integrations/telegram/telegram.controller.ts@@ -0,0 +1,20 @@+import {+ Controller,+ Logger,+ Post,+ HttpCode,+ HttpStatus,+ Req,+} from '@nestjs/common'++@Controller({ path: 'telegram', version: '1' })+export class TelegramController {+ private readonly logger = new Logger(TelegramController.name)++ @Post()+ @HttpCode(HttpStatus.OK)+ async handleTelegramWebhook(@Req() request: Request) {+ this.logger.log(request.body)+ return 'OK'+ }+}diff --git a/src/integrations/telegram/telegram.module.ts b/src/integrations/telegram/telegram.module.tsindex fed01bf7d..06fb1c618 100644--- a/src/integrations/telegram/telegram.module.ts+++ b/src/integrations/telegram/telegram.module.ts@@ -1,6 +1,7 @@import { Module } from '@nestjs/common'import { ConfigService } from '@nestjs/config'import { TelegrafModule } from 'nestjs-telegraf'+import { TelegramController } from './telegram.controller'@Module({imports: [@@ -27,5 +28,6 @@ import { TelegrafModule } from 'nestjs-telegraf'}),}),],+ controllers: [TelegramController],})export class TelegramModule {}