Skip to content
Snippets Groups Projects
Commit de94c6f8 authored by Pierre Ecarlat's avatar Pierre Ecarlat
Browse files

fix(client-connect): prevent empty consent creation

parent 00db4b1a
No related branches found
No related tags found
2 merge requests!43Merge dev into master,!36fix(client-connect): prevent empty consent creation
......@@ -52,7 +52,9 @@
"perim",
"periode",
"publiees",
"releve"
"releve",
"statut",
"traitement"
],
"prettier.semi": true
}
......@@ -95,6 +95,12 @@ async function createConsent({
const startDateString = moment(startDate).format('YYYY-MM-DD')
const endDateString = moment(endDate).format('YYYY-MM-DD')
// Handle some accounts running everyday with no consent (previous accounts from oauth)
if (!lastname) {
log('error', 'No lastname provided, stopping consent creation')
throw errors.USER_ACTION_NEEDED
}
const { ID: consentId } = await createBoConsent({
boUrlGRDF,
boToken,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment