mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
chore: update response codes (#20770)
* chore: update response codes * chore: skip problematic test
This commit is contained in:
parent
2ce4f8dd3b
commit
13563fc507
33 changed files with 119 additions and 85 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { Body, Controller, Delete, Get, Param, Put, Query } from '@nestjs/common';
|
||||
import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Put, Query } from '@nestjs/common';
|
||||
import { ApiTags } from '@nestjs/swagger';
|
||||
import { AuthDto } from 'src/dtos/auth.dto';
|
||||
import {
|
||||
|
|
@ -26,12 +26,14 @@ export class NotificationController {
|
|||
|
||||
@Put()
|
||||
@Authenticated({ permission: Permission.NotificationUpdate })
|
||||
@HttpCode(HttpStatus.NO_CONTENT)
|
||||
updateNotifications(@Auth() auth: AuthDto, @Body() dto: NotificationUpdateAllDto): Promise<void> {
|
||||
return this.service.updateAll(auth, dto);
|
||||
}
|
||||
|
||||
@Delete()
|
||||
@Authenticated({ permission: Permission.NotificationDelete })
|
||||
@HttpCode(HttpStatus.NO_CONTENT)
|
||||
deleteNotifications(@Auth() auth: AuthDto, @Body() dto: NotificationDeleteAllDto): Promise<void> {
|
||||
return this.service.deleteAll(auth, dto);
|
||||
}
|
||||
|
|
@ -54,6 +56,7 @@ export class NotificationController {
|
|||
|
||||
@Delete(':id')
|
||||
@Authenticated({ permission: Permission.NotificationDelete })
|
||||
@HttpCode(HttpStatus.NO_CONTENT)
|
||||
deleteNotification(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise<void> {
|
||||
return this.service.delete(auth, id);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue