Merged PR 171: B2Cserviceのエラーの解消
<内容> - 不要な処理を削除(削除漏れだった箇所)
This commit is contained in:
parent
ef17e4ff0b
commit
756f6155d5
@ -142,7 +142,6 @@ export class TasksService {
|
||||
return x.typist_user.external_id;
|
||||
}
|
||||
});
|
||||
console.log(assigneesExternalIds.concat(undefined));
|
||||
|
||||
//重複をなくす
|
||||
const distinctedExternalIds = [
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user