add log bug fix
This commit is contained in:
parent
c23dc6eff6
commit
c489138479
@ -124,12 +124,19 @@ export default class IdNotService extends BaseService {
|
|||||||
|
|
||||||
const token = await fetch(this.variables.IDNOT_BASE_URL + this.variables.IDNOT_CONNEXION_URL + "?" + query, { method: "POST" });
|
const token = await fetch(this.variables.IDNOT_BASE_URL + this.variables.IDNOT_CONNEXION_URL + "?" + query, { method: "POST" });
|
||||||
|
|
||||||
|
console.log("URL");
|
||||||
|
console.log(this.variables.IDNOT_BASE_URL + this.variables.IDNOT_CONNEXION_URL + "?" + query, { method: "POST" });
|
||||||
|
|
||||||
if (token.status !== 200) console.error(await token.text());
|
if (token.status !== 200) console.error(await token.text());
|
||||||
|
|
||||||
const decodedToken = (await token.json()) as IIdNotToken;
|
const decodedToken = (await token.json()) as IIdNotToken;
|
||||||
|
|
||||||
|
console.log({ decodedToken });
|
||||||
|
|
||||||
const decodedIdToken = jwt.decode(decodedToken.id_token) as IdNotJwtPayload;
|
const decodedIdToken = jwt.decode(decodedToken.id_token) as IdNotJwtPayload;
|
||||||
|
|
||||||
|
console.log({ decodedIdToken });
|
||||||
|
|
||||||
return decodedIdToken;
|
return decodedIdToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,11 +188,16 @@ export default class IdNotService extends BaseService {
|
|||||||
const searchParams = new URLSearchParams({
|
const searchParams = new URLSearchParams({
|
||||||
key: this.variables.IDNOT_API_KEY,
|
key: this.variables.IDNOT_API_KEY,
|
||||||
});
|
});
|
||||||
return (await (
|
console.log("URL: getOfficeMemberships");
|
||||||
await fetch(`${this.variables.IDNOT_API_BASE_URL}/api/pp/v2/entites/${office.idNot}/personnes?` + searchParams, {
|
|
||||||
method: "GET",
|
const URl = `${this.variables.IDNOT_API_BASE_URL}/api/pp/v2/entites/${office.idNot}/personnes?` + searchParams;
|
||||||
})
|
console.log(URl);
|
||||||
).json()) as any;
|
|
||||||
|
const response = await fetch(URl, {
|
||||||
|
method: "GET",
|
||||||
|
});
|
||||||
|
|
||||||
|
return (await response.json()) as any;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getOfficeStatus(statusName: string) {
|
public getOfficeStatus(statusName: string) {
|
||||||
@ -289,7 +301,7 @@ export default class IdNotService extends BaseService {
|
|||||||
await this.userService.updateCheckedAt(user.uid!);
|
await this.userService.updateCheckedAt(user.uid!);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async updateOffice(officeId: string) {
|
public async updateOffice(officeId: string) {
|
||||||
const officeInfos = await this.officeService.getByUid(officeId);
|
const officeInfos = await this.officeService.getByUid(officeId);
|
||||||
const office = Office.hydrate<Office>(officeInfos!);
|
const office = Office.hydrate<Office>(officeInfos!);
|
||||||
const searchParams = new URLSearchParams({
|
const searchParams = new URLSearchParams({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user