fix: asset deletes not filtering by ownerId

This commit is contained in:
Zack Pollard 2025-03-07 17:03:58 +00:00 committed by Alex
parent 3d24230269
commit 36ca115f52
No known key found for this signature in database
GPG Key ID: 53CD082B3A5E1082

View File

@ -99,6 +99,7 @@ export class SyncRepository {
return this.db return this.db
.selectFrom('assets_audit') .selectFrom('assets_audit')
.select(['id', 'assetId']) .select(['id', 'assetId'])
.where('ownerId', '=', userId)
.$if(!!ack, (qb) => qb.where('id', '>', ack!.updateId)) .$if(!!ack, (qb) => qb.where('id', '>', ack!.updateId))
.$call((qb) => this.auditTableFilters(qb, ack)) .$call((qb) => this.auditTableFilters(qb, ack))
.stream(); .stream();