Compare commits

...

2 Commits

Author SHA1 Message Date
Timon 413df53ec9 Merge branch 'main' into fix/empty-trash 2026-06-12 17:21:55 +02:00
timonrieger 0d45aa76e1 fix(server): empty trash skips offline external library assets 2026-06-12 17:15:14 +02:00
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -15,7 +15,8 @@ set
"status" = $1
where
"ownerId" = $2
and "status" = $3
and "deletedAt" is not null
and "status" != $3
-- TrashRepository.restoreAll
update "asset"
+2 -1
View File
@@ -28,7 +28,8 @@ export class TrashRepository {
const { numUpdatedRows } = await this.db
.updateTable('asset')
.where('ownerId', '=', userId)
.where('status', '=', AssetStatus.Trashed)
.where('deletedAt', 'is not', null)
.where('status', '!=', AssetStatus.Deleted)
.set({ status: AssetStatus.Deleted })
.executeTakeFirst();