full project: admin panel, backend modules, docs
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { ApiTags } from '@nestjs/swagger';
|
||||
import { Controller, Get, Patch, Body, UseGuards } from '@nestjs/common';
|
||||
import { ApiTags, ApiBearerAuth } from '@nestjs/swagger';
|
||||
import { SettingsService } from './settings.service';
|
||||
import { JwtAuthGuard } from '../auth/jwt-auth.guard';
|
||||
|
||||
@ApiTags('Settings')
|
||||
@Controller('settings')
|
||||
@@ -11,4 +12,11 @@ export class SettingsController {
|
||||
getGlobal() {
|
||||
return this.settings.getGlobal();
|
||||
}
|
||||
|
||||
@Patch()
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@ApiBearerAuth()
|
||||
updateGlobal(@Body() body: Record<string, any>) {
|
||||
return this.settings.updateGlobal(body);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user