feat(support-chat): add admin smart chat settings
This commit is contained in:
1 parent
fa4f1124e6
commit
b6735b5a9c
14 files changed
+285
-25
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import { Body, Controller, Get, Put, UseGuards, Header } from '@nestjs/common';
|
||||
import { JwtAuthGuard } from '../auth/jwt-auth.guard';
|
||||
import { RolesGuard } from '../common/guards/roles.guard';
|
||||
import { Roles } from '../common/decorators/roles.decorator';
|
||||
import { SupportChatSettingsService } from './support-chat-settings.service';
|
||||
@Controller('support-chat')
|
||||
export class SupportChatSettingsController {
|
||||
constructor(private readonly settings: SupportChatSettingsService) {}
|
||||
@Get('config') @Header('Cache-Control', 'no-store')
|
||||
config() { return this.settings.publicConfig(); }
|
||||
@Get('settings') @UseGuards(JwtAuthGuard, RolesGuard) @Roles('Admin') @Header('Cache-Control', 'no-store')
|
||||
read() { return this.settings.read(); }
|
||||
@Get('catalog') @UseGuards(JwtAuthGuard, RolesGuard) @Roles('Admin') @Header('Cache-Control', 'no-store')
|
||||
catalog() { return this.settings.catalog(); }
|
||||
@Put('settings') @UseGuards(JwtAuthGuard, RolesGuard) @Roles('Admin')
|
||||
save(@Body() body: unknown) { return this.settings.save(body); }
|
||||
}
|
||||
Reference in new issue
Block a user