import { Controller, Get, Put, Body, UseGuards } from '@nestjs/common'; import { JwtAuthGuard } from '../auth/jwt-auth.guard'; import { SettingsService } from './settings.service'; @UseGuards(JwtAuthGuard) @Controller('settings') export class SettingsController { constructor(private settings: SettingsService) {} @Get() getAll() { return this.settings.getAll(); } @Put() update(@Body() body: Record) { return this.settings.setMany(body); } }