|
|
|
@ -81,6 +81,13 @@ export class AssetController {
|
|
|
|
return this.service.get(auth, id) as Promise<AssetResponseDto>;
|
|
|
|
return this.service.get(auth, id) as Promise<AssetResponseDto>;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@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);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Put(':id')
|
|
|
|
@Put(':id')
|
|
|
|
@Authenticated({ permission: Permission.AssetUpdate })
|
|
|
|
@Authenticated({ permission: Permission.AssetUpdate })
|
|
|
|
updateAsset(
|
|
|
|
updateAsset(
|
|
|
|
@ -91,13 +98,6 @@ export class AssetController {
|
|
|
|
return this.service.update(auth, id, dto);
|
|
|
|
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')
|
|
|
|
@Get(':id/metadata')
|
|
|
|
@Authenticated({ permission: Permission.AssetRead })
|
|
|
|
@Authenticated({ permission: Permission.AssetRead })
|
|
|
|
getAssetMetadata(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise<AssetMetadataResponseDto[]> {
|
|
|
|
getAssetMetadata(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise<AssetMetadataResponseDto[]> {
|
|
|
|
|