From 545b206076f376e43a8dfdc108801a874305c85c Mon Sep 17 00:00:00 2001 From: Jason Rasmussen Date: Wed, 10 Jul 2024 09:46:52 -0400 Subject: [PATCH] chore(server): remove unused code (#10999) chore(sesrver): remove unused code --- server/src/repositories/asset.repository.ts | 5 +---- server/src/repositories/metadata.repository.ts | 7 ++----- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/server/src/repositories/asset.repository.ts b/server/src/repositories/asset.repository.ts index c11341fdcf..cc9fac4652 100644 --- a/server/src/repositories/asset.repository.ts +++ b/server/src/repositories/asset.repository.ts @@ -1,11 +1,10 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Chunked, ChunkedArray, DummyValue, GenerateSql } from 'src/decorators'; -import { AlbumEntity, AssetOrder } from 'src/entities/album.entity'; +import { AssetOrder } from 'src/entities/album.entity'; import { AssetJobStatusEntity } from 'src/entities/asset-job-status.entity'; import { AssetEntity, AssetType } from 'src/entities/asset.entity'; import { ExifEntity } from 'src/entities/exif.entity'; -import { PartnerEntity } from 'src/entities/partner.entity'; import { SmartInfoEntity } from 'src/entities/smart-info.entity'; import { AssetBuilderOptions, @@ -63,8 +62,6 @@ export class AssetRepository implements IAssetRepository { @InjectRepository(ExifEntity) private exifRepository: Repository, @InjectRepository(AssetJobStatusEntity) private jobStatusRepository: Repository, @InjectRepository(SmartInfoEntity) private smartInfoRepository: Repository, - @InjectRepository(PartnerEntity) private partnerRepository: Repository, - @InjectRepository(AlbumEntity) private albumRepository: Repository, ) {} async upsertExif(exif: Partial): Promise { diff --git a/server/src/repositories/metadata.repository.ts b/server/src/repositories/metadata.repository.ts index a7c6bd13bb..dfb9f676c2 100644 --- a/server/src/repositories/metadata.repository.ts +++ b/server/src/repositories/metadata.repository.ts @@ -1,22 +1,19 @@ import { Inject, Injectable } from '@nestjs/common'; -import { InjectDataSource, InjectRepository } from '@nestjs/typeorm'; +import { InjectRepository } from '@nestjs/typeorm'; import { DefaultReadTaskOptions, ExifTool, Tags } from 'exiftool-vendored'; import geotz from 'geo-tz'; import { DummyValue, GenerateSql } from 'src/decorators'; import { ExifEntity } from 'src/entities/exif.entity'; -import { GeodataPlacesEntity } from 'src/entities/geodata-places.entity'; import { ILoggerRepository } from 'src/interfaces/logger.interface'; import { IMetadataRepository, ImmichTags } from 'src/interfaces/metadata.interface'; import { Instrumentation } from 'src/utils/instrumentation'; -import { DataSource, Repository } from 'typeorm'; +import { Repository } from 'typeorm'; @Instrumentation() @Injectable() export class MetadataRepository implements IMetadataRepository { constructor( @InjectRepository(ExifEntity) private exifRepository: Repository, - @InjectRepository(GeodataPlacesEntity) private geodataPlacesRepository: Repository, - @InjectDataSource() private dataSource: DataSource, @Inject(ILoggerRepository) private logger: ILoggerRepository, ) { this.logger.setContext(MetadataRepository.name);