fix: face and edit handling (#25738)

* fix: handle edits when creating face
This commit is contained in:
Brandon Wees
2026-02-05 13:29:46 -06:00
committed by GitHub
parent cfc5ed5997
commit 37e5968a7a
6 changed files with 938 additions and 34 deletions
+6
View File
@@ -6,6 +6,7 @@ import { Stats } from 'node:fs';
import { Writable } from 'node:stream';
import { AssetFace } from 'src/database';
import { AuthDto, LoginResponseDto } from 'src/dtos/auth.dto';
import { AssetEditActionListDto } from 'src/dtos/editing.dto';
import {
AlbumUserRole,
AssetType,
@@ -280,6 +281,11 @@ export class MediumTestContext<S extends BaseService = BaseService> {
const result = await this.get(TagRepository).upsertAssetIds(tagsAssets);
return { tagsAssets, result };
}
async newEdits(assetId: string, dto: AssetEditActionListDto) {
const edits = await this.get(AssetEditRepository).replaceAll(assetId, dto.edits);
return { edits };
}
}
export class SyncTestContext extends MediumTestContext<SyncService> {