fix(server): query fixes (#15509)

This commit is contained in:
Mert
2025-01-22 15:17:42 -05:00
committed by GitHub
parent 7b882b35e5
commit 49a6961ec6
15 changed files with 275 additions and 165 deletions

View File

@@ -38,6 +38,10 @@ export class TrashRepository implements ITrashRepository {
@GenerateSql({ params: [[DummyValue.UUID]] })
async restoreAll(ids: string[]): Promise<number> {
if (ids.length === 0) {
return 0;
}
const { numUpdatedRows } = await this.db
.updateTable('assets')
.where('status', '=', AssetStatus.TRASHED)