feat(notifications): add Zalo OA webhook controller + WebSocket gateway tests
- Add ZaloOaWebhookController: GET verification endpoint, POST event handler for follow/unfollow/user_send_text events with user linking via OAuthAccount - Register webhook controller in NotificationsModule - Add 13 unit tests for webhook (challenge verify, follow/unfollow/message handling, linked/unlinked users, error resilience) - Add 18 unit tests for NotificationsGateway (JWT auth, multi-device tracking, disconnect cleanup, notification.sent event, Redis cache, unread count) Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -27,6 +27,7 @@ import { StringeeSmsService } from './infrastructure/services/stringee-sms.servi
|
||||
import { TemplateService } from './infrastructure/services/template.service';
|
||||
import { ZaloOaService } from './infrastructure/services/zalo-oa.service';
|
||||
import { NotificationsController } from './presentation/controllers/notifications.controller';
|
||||
import { ZaloOaWebhookController } from './presentation/controllers/zalo-oa-webhook.controller';
|
||||
import { NotificationsGateway } from './presentation/gateways/notifications.gateway';
|
||||
|
||||
const CommandHandlers = [SendNotificationHandler];
|
||||
@@ -51,7 +52,7 @@ const EventListeners = [
|
||||
|
||||
@Module({
|
||||
imports: [CqrsModule, AuthModule],
|
||||
controllers: [NotificationsController],
|
||||
controllers: [NotificationsController, ZaloOaWebhookController],
|
||||
providers: [
|
||||
// Repositories
|
||||
{ provide: NOTIFICATION_REPOSITORY, useClass: PrismaNotificationRepository },
|
||||
|
||||
Reference in New Issue
Block a user