Merged PR 171: B2Cserviceのエラーの解消

<内容>
- 不要な処理を削除(削除漏れだった箇所)
This commit is contained in:
saito.k 2023-06-20 08:06:04 +00:00
parent ef17e4ff0b
commit 756f6155d5
2 changed files with 3 additions and 10 deletions

View File

@ -142,7 +142,6 @@ export class TasksService {
return x.typist_user.external_id;
}
});
console.log(assigneesExternalIds.concat(undefined));
//重複をなくす
const distinctedExternalIds = [

View File

@ -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;