mirror of
https://github.com/certd/certd.git
synced 2026-04-14 12:30:54 +08:00
fix: base service bug
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
|
||||
"useWorkspaces": true,
|
||||
"version": "0.0.0",
|
||||
"version": "1.0.0",
|
||||
"npmClient": "yarn"
|
||||
}
|
||||
@@ -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