Skip to content

Commit 4fd186b

Browse files
committed
refactor(OUT-2076): clean code
1 parent 390f42b commit 4fd186b

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎src/app/api/users/users.service.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@ class UsersService extends BaseService {
3434
// NOTE: Get currentInternalUser with a separate CopilotAPI call. This adds a
3535
// Copilot call, but saves us from having to `.find` in a potentially large array
3636

37+
const listArgs = { limit: MAX_FETCH_ASSIGNEE_COUNT, nextToken }
38+
3739
const [currentInternalUser, ius, clients, companies, currentWorkspace] = await Promise.all([
3840
this.copilot.getInternalUser(user.internalUserId!),
39-
this.copilot.getInternalUsers({ limit: MAX_FETCH_ASSIGNEE_COUNT, nextToken }),
40-
this.copilot.getClients({ limit: MAX_FETCH_ASSIGNEE_COUNT, nextToken }),
41-
this.copilot.getCompanies({ limit: MAX_FETCH_ASSIGNEE_COUNT, nextToken, isPlaceholder: false }),
41+
this.copilot.getInternalUsers(listArgs),
42+
this.copilot.getClients(listArgs),
43+
this.copilot.getCompanies({ ...listArgs, isPlaceholder: false }),
4244
this.copilot.getWorkspace(),
4345
])
4446

0 commit comments

Comments
 (0)