Spaces:
Running
Running
Bibhu Mishra
Add GitHub Actions CI/CD, HF Space deployment, market hours guard, and static serving
abc493d | import { Body, Controller, ForbiddenException, Get, Patch, Request, UseGuards } from '@nestjs/common'; | |
| import { JwtAuthGuard } from '../auth/jwt-auth.guard'; | |
| import { SettingsService } from './settings.service'; | |
| ('settings') | |
| (JwtAuthGuard) | |
| export class SettingsController { | |
| constructor(private svc: SettingsService) {} | |
| () | |
| findAll() { return this.svc.findAll(); } | |
| () | |
| update(() body: Record<string, string>, () req: { user: { role: string } }) { | |
| if (req.user.role !== 'admin') throw new ForbiddenException(); | |
| return this.svc.update(body); | |
| } | |
| } | |