more verbosity
This commit is contained in:
parent
b96720c0af
commit
384e139ced
@ -256,6 +256,8 @@ export default class IdNotService extends BaseService {
|
||||
if (userData.deleted) {
|
||||
let rattachements: any;
|
||||
|
||||
console.log("Fetching rattachements for user", user.uid);
|
||||
console.log(searchParams.toString());
|
||||
try {
|
||||
rattachements = await fetch(`${this.variables.IDNOT_API_BASE_URL}/api/pp/v2/personnes/${user.idNot}/rattachements?deleted=false` + searchParams, {
|
||||
method: "GET",
|
||||
@ -383,14 +385,17 @@ export default class IdNotService extends BaseService {
|
||||
let updates = 0;
|
||||
//093051 = demo
|
||||
if (office.name !== officeData.denominationSociale && office.name !== officeData.codeCrpcen && office.crpcen !== "029178" && office.crpcen !== "035010" && office.crpcen !== "093051") {
|
||||
console.log(`Updating office name: ${office.uid} - ${office.name} - ${office.crpcen}`);
|
||||
updates++;
|
||||
office.name = officeData.denominationSociale ?? officeData.codeCrpcen;
|
||||
console.log(`New name: ${office.name}`);
|
||||
}
|
||||
if (office.office_status !== this.getOfficeStatus(officeData.statutEntite.name)) {
|
||||
console.log(`Updating office status: ${office.uid} - ${office.name} - ${office.crpcen}`);
|
||||
updates++;
|
||||
office.office_status = this.getOfficeStatus(officeData.statutEntite.name);
|
||||
console.log(`New status: ${office.office_status}`);
|
||||
}
|
||||
console.log(`Updating office: ${office.uid} - ${office.name} - ${office.crpcen}`);
|
||||
if (updates != 0) await this.officeService.update(office.uid!, office);
|
||||
await this.officeService.updateCheckedAt(office.uid!);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user