mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-05 23:53:21 +00:00
Compare commits
1 Commits
jmccannon/
...
v2025.5.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
396b6282ad |
@@ -26,7 +26,7 @@ export class BatchRequestBuilder implements RequestBuilder {
|
|||||||
|
|
||||||
const requests: OrganizationImportRequest[] = [];
|
const requests: OrganizationImportRequest[] = [];
|
||||||
|
|
||||||
if (users.length > 0) {
|
if (users?.length > 0) {
|
||||||
const usersRequest = users.map((u) => {
|
const usersRequest = users.map((u) => {
|
||||||
return {
|
return {
|
||||||
email: u.email,
|
email: u.email,
|
||||||
@@ -48,7 +48,7 @@ export class BatchRequestBuilder implements RequestBuilder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (groups.length > 0) {
|
if (groups?.length > 0) {
|
||||||
const groupRequest = groups.map((g) => {
|
const groupRequest = groups.map((g) => {
|
||||||
return {
|
return {
|
||||||
name: g.name,
|
name: g.name,
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ export class SyncService {
|
|||||||
users: UserEntry[],
|
users: UserEntry[],
|
||||||
syncConfig: SyncConfiguration,
|
syncConfig: SyncConfiguration,
|
||||||
): OrganizationImportRequest[] {
|
): OrganizationImportRequest[] {
|
||||||
if (syncConfig.largeImport && groups.length + users.length > batchSize) {
|
if (syncConfig.largeImport && (groups?.length ?? 0) + (users?.length ?? 0) > batchSize) {
|
||||||
return this.batchRequestBuilder.buildRequest(groups, users, syncConfig);
|
return this.batchRequestBuilder.buildRequest(groups, users, syncConfig);
|
||||||
} else {
|
} else {
|
||||||
return this.singleRequestBuilder.buildRequest(groups, users, syncConfig);
|
return this.singleRequestBuilder.buildRequest(groups, users, syncConfig);
|
||||||
|
|||||||
Reference in New Issue
Block a user