refactor(server): controller cleanup (#11923)

chore(server): controller cleanup
This commit is contained in:
Jason Rasmussen 2024-08-20 08:50:14 -04:00 committed by GitHub
parent ef9a06be5c
commit 3be1aaaaa4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 656 additions and 1186 deletions

View file

@ -1,4 +1,4 @@
import { Body, Controller, HttpCode, Post } from '@nestjs/common';
import { Body, Controller, HttpCode, HttpStatus, Post } from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import { AuthDto } from 'src/dtos/auth.dto';
import { SystemConfigSmtpDto } from 'src/dtos/system-config.dto';
@ -11,7 +11,7 @@ export class NotificationController {
constructor(private service: NotificationService) {}
@Post('test-email')
@HttpCode(200)
@HttpCode(HttpStatus.OK)
@Authenticated({ admin: true })
sendTestEmail(@Auth() auth: AuthDto, @Body() dto: SystemConfigSmtpDto) {
return this.service.sendTestEmail(auth.user.id, dto);