refactor: view repository (#15496)

This commit is contained in:
Jason Rasmussen
2025-01-21 13:26:13 -05:00
committed by GitHub
parent 5171630b98
commit ccf6d71c3c
9 changed files with 24 additions and 24 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import { AssetResponseDto, mapAsset } from 'src/dtos/asset-response.dto';
import { AuthDto } from 'src/dtos/auth.dto';
import { AssetEntity } from 'src/entities/asset.entity';
import { BaseService } from 'src/services/base.service';
export class ViewService extends BaseService {
@@ -9,6 +10,6 @@ export class ViewService extends BaseService {
async getAssetsByOriginalPath(auth: AuthDto, path: string): Promise<AssetResponseDto[]> {
const assets = await this.viewRepository.getAssetsByOriginalPath(auth.user.id, path);
return assets.map((asset) => mapAsset(asset, { auth }));
return assets.map((asset) => mapAsset(asset as unknown as AssetEntity, { auth }));
}
}