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) => ({
|
||||
...a,
|
||||
userCount: list.find((b) => b.branchId === a.id)?._count ?? 0,
|
||||
}));
|
||||
return record.map((a) =>
|
||||
Object.assign(a, {
|
||||
count: list.find((b) => b.branchId === a.id)?._count ?? 0,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
@Get()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue