refactor(server): auth route metadata (#9344)

This commit is contained in:
Jason Rasmussen
2024-05-09 13:58:44 -04:00
committed by GitHub
parent 34d8879d32
commit 8743e17528
33 changed files with 171 additions and 135 deletions

View File

@@ -7,24 +7,26 @@ import { TrashService } from 'src/services/trash.service';
@ApiTags('Trash')
@Controller('trash')
@Authenticated()
export class TrashController {
constructor(private service: TrashService) {}
@Post('empty')
@HttpCode(HttpStatus.NO_CONTENT)
@Authenticated()
emptyTrash(@Auth() auth: AuthDto): Promise<void> {
return this.service.empty(auth);
}
@Post('restore')
@HttpCode(HttpStatus.NO_CONTENT)
@Authenticated()
restoreTrash(@Auth() auth: AuthDto): Promise<void> {
return this.service.restore(auth);
}
@Post('restore/assets')
@HttpCode(HttpStatus.NO_CONTENT)
@Authenticated()
restoreAssets(@Auth() auth: AuthDto, @Body() dto: BulkIdsDto): Promise<void> {
return this.service.restoreAssets(auth, dto);
}