Skip to content

Commit

Permalink
fix: mise a jour du type de organisme_id a la creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Pomarom committed Dec 17, 2024
1 parent 7ca03be commit 1b6ade7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/common/actions/account.actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function register(registration: RegistrationSchema): Promise<{
account_status: "PENDING_EMAIL_VALIDATION" | "CONFIRMED";
}> {
const alreadyExists = await getUserByEmail(registration.user.email);
let registrationExtraData = {};
let registrationExtraData: { organisme_id?: string } = {};
if (alreadyExists) {
throw Boom.conflict("Cet email est déjà utilisé.");
}
Expand Down Expand Up @@ -51,7 +51,7 @@ export async function register(registration: RegistrationSchema): Promise<{
organismesResponsables: [],
});
} finally {
registrationExtraData = { organisme_id: organisme?._id };
registrationExtraData = { organisme_id: organisme?._id.toString() };
}
}
const organisation = await organisationsDb().findOne(registration.organisation);
Expand Down

0 comments on commit 1b6ade7

Please sign in to comment.