mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor(server): controller cleanup (#11923)
chore(server): controller cleanup
This commit is contained in:
parent
ef9a06be5c
commit
3be1aaaaa4
25 changed files with 656 additions and 1186 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue