fix package version
This commit is contained in:
parent
5643a8ffe7
commit
988a10efde
@ -53,7 +53,7 @@
|
|||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"fp-ts": "^2.16.1",
|
"fp-ts": "^2.16.1",
|
||||||
"jsonwebtoken": "^9.0.0",
|
"jsonwebtoken": "^9.0.0",
|
||||||
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.92",
|
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.93",
|
||||||
"module-alias": "^2.2.2",
|
"module-alias": "^2.2.2",
|
||||||
"monocle-ts": "^2.3.13",
|
"monocle-ts": "^2.3.13",
|
||||||
"multer": "^1.4.5-lts.1",
|
"multer": "^1.4.5-lts.1",
|
||||||
|
@ -34,26 +34,34 @@ export default class CustomerController extends ApiController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await new Promise( resolve => setTimeout(resolve, 3000)); // wait 3 seconds to be sure that the enrollment is finilazed
|
await new Promise((resolve) => setTimeout(resolve, 3000)); // wait 3 seconds to be sure that the enrollment is finilazed
|
||||||
const res = await this.id360Service.getEnrollment(callbackToken);
|
const res = await this.id360Service.getEnrollment(callbackToken);
|
||||||
const enrollment = await res.json() as EnrollmentResponse;
|
const enrollment = (await res.json()) as EnrollmentResponse;
|
||||||
if (enrollment.status !== "OK") {
|
if (enrollment.status !== "OK") {
|
||||||
this.httpUnauthorized(response, "Enrollment status is not OK");
|
this.httpUnauthorized(response, "Enrollment status is not OK");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const customerData = await this.id360Service.getReport(enrollment.id);
|
const customerData = await this.id360Service.getReport(enrollment.id);
|
||||||
|
|
||||||
const customer = await this.customerService.get({
|
const customer = await this.customerService.get({
|
||||||
where: {
|
where: {
|
||||||
contact: {
|
contact: {
|
||||||
last_name: { contains: customerData.external_methods.france_connect.results.france_connect_out_userinfo[0].family_name,
|
last_name: {
|
||||||
mode: 'insensitive' },
|
contains: customerData.external_methods.france_connect.results.france_connect_out_userinfo[0].family_name,
|
||||||
first_name: { contains: customerData.external_methods.france_connect.results.france_connect_out_userinfo[0].given_name.split(" ")[0],
|
mode: "insensitive",
|
||||||
mode: 'insensitive'},
|
},
|
||||||
|
first_name: {
|
||||||
|
contains:
|
||||||
|
customerData.external_methods.france_connect.results.france_connect_out_userinfo[0].given_name.split(
|
||||||
|
" ",
|
||||||
|
)[0],
|
||||||
|
mode: "insensitive",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
include: {
|
include: {
|
||||||
contact: true,
|
contact: true,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
// const contact = await this.customerService.getByEmail(
|
// const contact = await this.customerService.getByEmail(
|
||||||
// customerData.external_methods.france_connect.results.france_connect_out_userinfo[0].email,
|
// customerData.external_methods.france_connect.results.france_connect_out_userinfo[0].email,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user