more verbosity
All checks were successful
All checks were successful
This commit is contained in:
parent
4f0f33a23f
commit
187da39509
@ -90,6 +90,7 @@ export default class UsersRepository extends BaseRepository {
|
||||
*/
|
||||
|
||||
public async update(uid: string, user: User): Promise<Users> {
|
||||
console.log("Updating user", JSON.stringify(user));
|
||||
const updateArgs: Prisma.UsersUpdateArgs = {
|
||||
where: {
|
||||
uid: uid,
|
||||
|
@ -313,9 +313,14 @@ export default class IdNotService extends BaseService {
|
||||
|
||||
let updates = 0;
|
||||
|
||||
console.log("user.office_membership.idNot", JSON.stringify(user.office_membership!.idNot));
|
||||
console.log("userData.entite.ou", JSON.stringify(userData.entite.ou));
|
||||
|
||||
if (user.office_membership!.idNot !== userData.entite.ou) {
|
||||
console.log("Updating user.office_membership");
|
||||
updates++;
|
||||
let officeData = (await this.officeService.get({ where: { idNot: userData.entite.ou } }))[0];
|
||||
console.log("officeData", JSON.stringify(officeData));
|
||||
if (!officeData) {
|
||||
let officeLocationData: IOfficeLocation;
|
||||
|
||||
@ -361,6 +366,7 @@ export default class IdNotService extends BaseService {
|
||||
user.contact!.cell_phone_number = userData.numeroMobile;
|
||||
console.log("Updated user.contact.cell_phone_number", JSON.stringify(user.contact!.cell_phone_number));
|
||||
}
|
||||
console.log("updates", updates);
|
||||
if (updates != 0) await this.userService.update(user.uid!, user);
|
||||
await this.userService.updateCheckedAt(user.uid!);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user