fix(server): hide isFavorite from partner asset sync stream

This commit is contained in:
timonrieger 2026-04-22 23:43:54 +02:00
parent f0835d06f8
commit cdd47f3b10
No known key found for this signature in database

View File

@ -595,7 +595,8 @@ class PartnerAssetsSync extends BaseSync {
@GenerateSql({ params: [dummyBackfillOptions, DummyValue.UUID], stream: true })
getBackfill(options: SyncBackfillOptions, partnerId: string) {
return this.backfillQuery('asset', options)
.select(columns.syncAsset)
.select(columns.syncAsset.filter((c) => c !== 'asset.isFavorite') as ReadonlyArray<(typeof columns.syncAsset)[number]>)
.select(sql<boolean>`false`.as('isFavorite'))
.select('asset.updateId')
.where('ownerId', '=', partnerId)
.stream();
@ -614,7 +615,8 @@ class PartnerAssetsSync extends BaseSync {
@GenerateSql({ params: [dummyQueryOptions], stream: true })
getUpserts(options: SyncQueryOptions) {
return this.upsertQuery('asset', options)
.select(columns.syncAsset)
.select(columns.syncAsset.filter((c) => c !== 'asset.isFavorite') as ReadonlyArray<(typeof columns.syncAsset)[number]>)
.select(sql<boolean>`false`.as('isFavorite'))
.select('asset.updateId')
.where('ownerId', 'in', (eb) =>
eb.selectFrom('partner').select(['sharedById']).where('sharedWithId', '=', options.userId),