mirror of
https://github.com/certd/certd.git
synced 2026-04-23 11:37:23 +08:00
fix: base service bug
This commit is contained in:
@@ -23,9 +23,7 @@ export abstract class BaseService<T> {
|
||||
if (!id) {
|
||||
throw new ValidateException('id不能为空');
|
||||
}
|
||||
const info = await this.getRepository().findOne({
|
||||
where:{ id }
|
||||
});
|
||||
const info = await this.getRepository().findOneBy({ id } as any);
|
||||
if (info && infoIgnoreProperty) {
|
||||
for (const property of infoIgnoreProperty) {
|
||||
delete info[property];
|
||||
|
||||
Reference in New Issue
Block a user