fix(server): deduplicate shared links in getAll query (#26395)

This commit is contained in:
Min Idzelis
2026-03-01 14:41:15 -05:00
committed by GitHub
parent 02d356f5dd
commit 84abad564e
4 changed files with 508 additions and 29 deletions
+8
View File
@@ -233,6 +233,14 @@ export class MediumTestContext<S extends BaseService = BaseService> {
return { albumUser: { albumId, userId, role }, result };
}
async softDeleteAsset(assetId: string) {
await this.database.updateTable('asset').set({ deletedAt: new Date() }).where('id', '=', assetId).execute();
}
async softDeleteAlbum(albumId: string) {
await this.database.updateTable('album').set({ deletedAt: new Date() }).where('id', '=', albumId).execute();
}
async newJobStatus(dto: Partial<Insertable<AssetJobStatusTable>> & { assetId: string }) {
const jobStatus = mediumFactory.assetJobStatusInsert({ assetId: dto.assetId });
const result = await this.get(AssetRepository).upsertJobStatus(jobStatus);