refactor: field name
This commit is contained in:
parent
875f7ae023
commit
356e307470
1 changed files with 5 additions and 4 deletions
|
|
@ -77,10 +77,11 @@ export class BranchController extends Controller {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
return record.map((a) => ({
|
return record.map((a) =>
|
||||||
...a,
|
Object.assign(a, {
|
||||||
userCount: list.find((b) => b.branchId === a.id)?._count ?? 0,
|
count: list.find((b) => b.branchId === a.id)?._count ?? 0,
|
||||||
}));
|
}),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get()
|
@Get()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue