feat: add open router proxy
This commit is contained in:
@@ -11,6 +11,7 @@ import type { Response } from 'express';
|
||||
import { ChatDTO } from './dtos/chat.dto';
|
||||
import { ActiveUser } from '@/common/decorators/active-user.decorator';
|
||||
import { User } from '../users/entities/user.entity';
|
||||
import { ApiAppResponse } from '@/common/decorators/api-app-response.decorator';
|
||||
|
||||
@Controller('chatbot')
|
||||
export class ChatbotController {
|
||||
@@ -23,6 +24,16 @@ export class ChatbotController {
|
||||
|
||||
@Post('chat')
|
||||
@HttpCode(HttpStatus.OK)
|
||||
@ApiAppResponse([
|
||||
{
|
||||
status: HttpStatus.OK,
|
||||
variants: [
|
||||
{
|
||||
model: ChatDTO,
|
||||
},
|
||||
],
|
||||
},
|
||||
])
|
||||
public async chat(@Body() chatDto: ChatDTO, @ActiveUser() user: User) {
|
||||
return this.chatbotService.chat(
|
||||
user,
|
||||
|
||||
Reference in New Issue
Block a user