mirror of
https://github.com/Art051/immich.git
synced 2025-08-11 19:29:00 +00:00
* refactor: jobs and processors * refactor: storage migration processor * fix: tests * fix: code warning * chore: ignore coverage from infra * fix: sync move asset logic between job core and asset core * refactor: move error handling inside of catch * refactor(server): job core into dedicated service calls * refactor: smart info * fix: tests * chore: smart info tests * refactor: use asset repository * refactor: thumbnail processor * chore: coverage reqs
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'] });
|
|
}
|
|
}
|