feat: asset copy (#23172)

This commit is contained in:
Daniel Dietzler 2025-10-29 14:43:47 +01:00 committed by GitHub
parent fdfb04d83c
commit 4ae7cadeae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 644 additions and 2 deletions

View file

@ -5,6 +5,7 @@ import { AssetResponseDto } from 'src/dtos/asset-response.dto';
import {
AssetBulkDeleteDto,
AssetBulkUpdateDto,
AssetCopyDto,
AssetJobsDto,
AssetMetadataResponseDto,
AssetMetadataRouteParams,
@ -90,6 +91,13 @@ export class AssetController {
return this.service.update(auth, id, dto);
}
@Put('copy')
@Authenticated({ permission: Permission.AssetCopy })
@HttpCode(HttpStatus.NO_CONTENT)
copyAsset(@Auth() auth: AuthDto, @Body() dto: AssetCopyDto): Promise<void> {
return this.service.copy(auth, dto);
}
@Get(':id/metadata')
@Authenticated({ permission: Permission.AssetRead })
getAssetMetadata(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise<AssetMetadataResponseDto[]> {