@@ -488,7 +488,7 @@ async function submitCna (req, res, next) {
488488 return res . status ( 403 ) . json ( error . cveRecordExists ( ) )
489489 }
490490
491- const cnaContainer = req . ctx . body . cnaContainer
491+ const cnaContainer = convertDatesToISO ( req . ctx . body . cnaContainer , CONSTANTS . DATE_FIELDS )
492492 if ( erlCheck && ! isEnrichedContainer ( cnaContainer ) ) {
493493 // Process the ERL check here
494494 return res . status ( 403 ) . json ( error . erlCheckFailed ( ) )
@@ -497,7 +497,6 @@ async function submitCna (req, res, next) {
497497 // create full cve record here
498498 const owningCna = await orgRepo . findOneByUUID ( cveId . owning_cna )
499499 const assignerShortName = owningCna . short_name
500- const cnaContainer = convertDatesToISO ( req . ctx . body . cnaContainer , CONSTANTS . DATE_FIELDS )
501500 const dateUpdated = ( new Date ( ) ) . toISOString ( )
502501 const additionalCveMetadataFields = {
503502 assignerShortName : assignerShortName ,
@@ -585,15 +584,14 @@ async function updateCna (req, res, next) {
585584 return res . status ( 403 ) . json ( error . cveRecordDne ( ) )
586585 }
587586
588- const cnaContainer = req . ctx . body . cnaContainer
587+ const cnaContainer = convertDatesToISO ( req . ctx . body . cnaContainer , CONSTANTS . DATE_FIELDS )
589588 if ( erlCheck && ! isEnrichedContainer ( cnaContainer ) ) {
590589 // Process the ERL check here
591590 return res . status ( 403 ) . json ( error . erlCheckFailed ( ) )
592591 }
593592
594593 // update cve record here
595594 const cveRecord = result . cve
596- const cnaContainer = convertDatesToISO ( req . ctx . body . cnaContainer , CONSTANTS . DATE_FIELDS )
597595 const dateUpdated = ( new Date ( ) ) . toISOString ( )
598596 cveRecord . cveMetadata . dateUpdated = dateUpdated
599597
0 commit comments