mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-12-08 20:29:05 +00:00
* refactor(server): tsconfigs * chore: dummy commit * fix: start.sh * chore: restore original entry scripts
15 lines
560 B
TypeScript
15 lines
560 B
TypeScript
import { ISmartInfoRepository } from '@app/domain';
|
|
import { Injectable } from '@nestjs/common';
|
|
import { InjectRepository } from '@nestjs/typeorm';
|
|
import { Repository } from 'typeorm';
|
|
import { SmartInfoEntity } from '../entities';
|
|
|
|
@Injectable()
|
|
export class SmartInfoRepository implements ISmartInfoRepository {
|
|
constructor(@InjectRepository(SmartInfoEntity) private repository: Repository<SmartInfoEntity>) {}
|
|
|
|
async upsert(info: Partial<SmartInfoEntity>): Promise<void> {
|
|
await this.repository.upsert(info, { conflictPaths: ['assetId'] });
|
|
}
|
|
}
|