feat: simplifier le traitement des données d'éducation et d'expérience en supprimant les références à 'meta'

This commit is contained in:
2025-12-17 09:45:35 +01:00
parent e8cf7e0874
commit bf58727cac
2 changed files with 14 additions and 14 deletions

View File

@@ -10,13 +10,13 @@ export default defineCachedEventHandler(async (event) => {
}
return result
.sort((a, b) => new Date(b.meta.startDate as string).getTime() - new Date(a.meta.startDate as string).getTime())
.sort((a, b) => new Date(b.startDate).getTime() - new Date(a.startDate).getTime())
.map(edu => ({
degree: edu.meta.degree,
institution: edu.meta.institution,
startDate: edu.meta.startDate,
endDate: edu.meta.endDate,
location: edu.meta.location
degree: edu.degree,
institution: edu.institution,
startDate: edu.startDate,
endDate: edu.endDate,
location: edu.location
}))
}, {
maxAge: 60 * 60 * 24,

View File

@@ -10,15 +10,15 @@ export default defineCachedEventHandler(async (event) => {
}
return result
.sort((a, b) => new Date(b.meta.startDate as string).getTime() - new Date(a.meta.startDate as string).getTime())
.sort((a, b) => new Date(b.startDate).getTime() - new Date(a.startDate).getTime())
.map(exp => ({
title: exp.meta.title,
company: exp.meta.company,
companyUrl: exp.meta.companyUrl,
startDate: exp.meta.startDate,
endDate: exp.meta.endDate,
location: exp.meta.location,
description: exp.meta.description
title: exp.title,
company: exp.company,
companyUrl: exp.companyUrl,
startDate: exp.startDate,
endDate: exp.endDate,
location: exp.location,
description: exp.description
}))
},
{