Skip to content

Commit

Permalink
Merge pull request #377 from jiho-kr/feature/active-record-pattern
Browse files Browse the repository at this point in the history
feat: do not use ActiveRecord Pattern
  • Loading branch information
jiho-kr authored Dec 11, 2023
2 parents b8f8dca + 79a9b54 commit 5113d10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/crud.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export class CrudService<T extends BaseEntity> {
await this.repository.save(entity);
}

await (crudDeleteOneRequest.softDeleted ? entity.softRemove() : entity.remove());
await (crudDeleteOneRequest.softDeleted ? this.repository.softRemove(entity) : this.repository.remove(entity));
return this.excludeEntity(entity, crudDeleteOneRequest.exclude);
});
};
Expand Down

0 comments on commit 5113d10

Please sign in to comment.