feat(support): isolated stateless customer chat with JWT gatekeeper

This commit is contained in:
devops committed 2026-10-14 16:48:56 +00:00
1 parent 8bf1843b9b
commit 8242a1271f
21 files changed
+413

No files matched your search

@@ -0,0 +1,13 @@
import { Body, Controller, Post, Req, UseGuards, Header } from '@nestjs/common';
import { Throttle } from '@nestjs/throttler';
import { SupportChatService } from './support-chat.service';
import { SupportChatDto } from './support-chat.dto';
import { OptionalCustomerJwtGuard } from './support-chat.guard';
@Controller('support-chat')
export class SupportChatController {
constructor(private readonly service: SupportChatService) {}
@Post('ask') @UseGuards(OptionalCustomerJwtGuard)
@Throttle({ default: { limit: 10, ttl: 60000 } })
@Header('Cache-Control', 'no-store')
ask(@Body() dto: SupportChatDto, @Req() req: { user?: { id: string } }) { return this.service.ask(dto, req.user); }
}