diff --git a/packages/orm/src/plugin/soft-delete-plugin.ts b/packages/orm/src/plugin/soft-delete-plugin.ts index 37e8e35f8..5b59bc72d 100644 --- a/packages/orm/src/plugin/soft-delete-plugin.ts +++ b/packages/orm/src/plugin/soft-delete-plugin.ts @@ -98,21 +98,21 @@ export class SoftDeleteQuery extends Query { async restoreOne() { const patch = { [deletedAtName]: undefined } as Partial; if (this.classSchema.hasProperty('deletedBy')) patch['deletedBy'] = undefined; - await this.withSoftDeleted().patchOne(patch); + return this.withSoftDeleted().patchOne(patch); } async restoreMany() { const patch = { [deletedAtName]: undefined } as Partial; if (this.classSchema.hasProperty('deletedBy')) patch['deletedBy'] = undefined; - await this.withSoftDeleted().patchMany(patch); + return this.withSoftDeleted().patchMany(patch); } async hardDeleteOne() { - await this.withSoftDeleted().deleteOne(); + return this.withSoftDeleted().deleteOne(); } async hardDeleteMany() { - await this.withSoftDeleted().deleteMany(); + return this.withSoftDeleted().deleteMany(); } }