-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(lbac-2409): migration recruteurslba to jobs_partners #1785
base: main
Are you sure you want to change the base?
Conversation
To deploy this PR just add a comment with a simple 🚀 |
|
||
if (!lbaCompaniesToUnsubscribe.length) { | ||
result = { result: UNSUBSCRIBE_EMAIL_ERRORS.NON_RECONNU } | ||
} else if (lbaCompaniesToUnsubscribe.length > 1 && !sirets) { | ||
const companies = lbaCompaniesToUnsubscribe.map((company) => { | ||
return { enseigne: company.enseigne, siret: company.siret, address: buildLbaCompanyAddress(company) } | ||
return { enseigne: company.workplace_legal_name!, siret: company.workplace_siret!, address: company.workplace_address_label } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return { enseigne: company.workplace_legal_name!, siret: company.workplace_siret!, address: company.workplace_address_label } | |
return { enseigne: company.workplace_legal_name, siret: company.workplace_siret, address: company.workplace_address_label } |
Ca me paraît dangereux
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@remy-auricoste c'est systématiquement valorisé pour les recruteurs_lba d'après la raw_recruteurslba. je peux modifier le modèle attendu en sortie sinon de la route.
server/src/http/controllers/unsubscribeRecruteurLba.controller.ts
Outdated
Show resolved
Hide resolved
unsubscribe_reason: reason, | ||
unsubscribe_date: now, | ||
} | ||
|
||
await getDbCollection("unsubscribedrecruteurslba").insertOne(unsubscribedLbaCompany) | ||
|
||
const lbaCompanyToUnsubscribe = await getDbCollection("recruteurslba").findOne({ siret }) | ||
const lbaCompanyToUnsubscribe = await getDbCollection("jobs_partners").findOne({ workplace_siret }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ca ne garantit pas qu'il s'agit d'un recruteur lba. Ca pourrait être une offre de la même entreprise venant d ailleurs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes j'ai update la query
projection: { _id: 0, email: 0, phone: 0, geopoint: 0, recruitment_potential: 0, opco_short_name: 0 }, | ||
collection: "jobs_partners", | ||
query: { partner_label: JOBPARTNERS_LABEL.RECRUTEURS_LBA }, | ||
projection: { _id: 0, apply_email: 0, apply_phone: 0, workplace_geopoint: 0, workplace_opco: 0, workplace_idcc: 0 }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
il faut probablement aussi enlever les champs techniques. Je pense qu'il faut plutôt passer à une white liste se basant sur le zod du endpoint de lecture publique
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
server/src/services/jobs/jobOpportunity/jobOpportunity.service.ts
Outdated
Show resolved
Hide resolved
@@ -183,7 +183,7 @@ const ZNewApplicationTransitionToV2 = ZApplicationOld.extend({ | |||
// KBA 20241011 to remove once V2 is LIVE and V1 support has ended | |||
export type INewApplicationV1 = z.output<typeof ZNewApplicationTransitionToV2> | |||
|
|||
export const ZJobCollectionName = z.enum(["recruteurslba", "partners", "recruiters"]) | |||
export const ZJobCollectionName = z.enum(["partners", "recruiters"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ca implique de faire une migration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@remy-auricoste A quel niveau ?
return LBA_ITEM_TYPE.RECRUTEURS_LBA | ||
|
||
case "offres": | ||
case "offres": // compatibility V1 to retreive FT jobs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alanlr tu confirmes ?
recruteurslba
versjobs_partners
https://tableaudebord-apprentissage.atlassian.net/browse/LBA-2409