chore: some more unit tests :) (#13159)

This commit is contained in:
Daniel Dietzler
2024-10-03 21:36:54 +02:00
committed by GitHub
parent db1623f43f
commit 2c8c3651de
3 changed files with 304 additions and 9 deletions

View File

@@ -185,9 +185,6 @@ export class AssetMediaService extends BaseService {
await requireAccess(this.accessRepository, { auth, permission: Permission.ASSET_DOWNLOAD, ids: [id] });
const asset = await this.findOrFail(id);
if (!asset) {
throw new NotFoundException('Asset does not exist');
}
return new ImmichFileResponse({
path: asset.originalPath,
@@ -223,9 +220,6 @@ export class AssetMediaService extends BaseService {
await requireAccess(this.accessRepository, { auth, permission: Permission.ASSET_VIEW, ids: [id] });
const asset = await this.findOrFail(id);
if (!asset) {
throw new NotFoundException('Asset does not exist');
}
if (asset.type !== AssetType.VIDEO) {
throw new BadRequestException('Asset is not a video');