diff --git a/dictation_server/src/features/tasks/tasks.service.ts b/dictation_server/src/features/tasks/tasks.service.ts index 175965f..64e5799 100644 --- a/dictation_server/src/features/tasks/tasks.service.ts +++ b/dictation_server/src/features/tasks/tasks.service.ts @@ -142,7 +142,6 @@ export class TasksService { return x.typist_user.external_id; } }); - console.log(assigneesExternalIds.concat(undefined)); //重複をなくす const distinctedExternalIds = [ diff --git a/dictation_server/src/gateways/adb2c/adb2c.service.ts b/dictation_server/src/gateways/adb2c/adb2c.service.ts index 6672a4f..efbf23b 100644 --- a/dictation_server/src/gateways/adb2c/adb2c.service.ts +++ b/dictation_server/src/gateways/adb2c/adb2c.service.ts @@ -200,7 +200,7 @@ export class AdB2cService { const chunkExternalIds = splitArrayInChunksOfFifteen(externalIds); try { - const resArr: AdB2cUser[] = []; + const b2cUsers: AdB2cUser[] = []; for (let index = 0; index < chunkExternalIds.length; index++) { const element = chunkExternalIds[index]; const res: AdB2cResponse = await this.graphClient @@ -208,16 +208,10 @@ export class AdB2cService { .select(['id', 'displayName']) .filter(`id in (${element.map((y) => `'${y}'`).join(',')})`) .get(); - resArr.push(...res.value); + b2cUsers.push(...res.value); } - const data: AdB2cResponse = await this.graphClient - .api(`users/`) - .select(['id', 'displayName']) - .filter(`id in (${externalIds.map((x) => `'${x}'`).join(',')})`) - .get(); - - return data.value; + return b2cUsers; } catch (e) { this.logger.error(e); const { statusCode } = e;