mirror of
https://github.com/ArthurDanjou/artmcp.git
synced 2026-01-14 14:44:21 +01:00
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:
@@ -10,13 +10,13 @@ export default defineCachedEventHandler(async (event) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return result
|
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 => ({
|
.map(edu => ({
|
||||||
degree: edu.meta.degree,
|
degree: edu.degree,
|
||||||
institution: edu.meta.institution,
|
institution: edu.institution,
|
||||||
startDate: edu.meta.startDate,
|
startDate: edu.startDate,
|
||||||
endDate: edu.meta.endDate,
|
endDate: edu.endDate,
|
||||||
location: edu.meta.location
|
location: edu.location
|
||||||
}))
|
}))
|
||||||
}, {
|
}, {
|
||||||
maxAge: 60 * 60 * 24,
|
maxAge: 60 * 60 * 24,
|
||||||
|
|||||||
@@ -10,15 +10,15 @@ export default defineCachedEventHandler(async (event) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return result
|
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 => ({
|
.map(exp => ({
|
||||||
title: exp.meta.title,
|
title: exp.title,
|
||||||
company: exp.meta.company,
|
company: exp.company,
|
||||||
companyUrl: exp.meta.companyUrl,
|
companyUrl: exp.companyUrl,
|
||||||
startDate: exp.meta.startDate,
|
startDate: exp.startDate,
|
||||||
endDate: exp.meta.endDate,
|
endDate: exp.endDate,
|
||||||
location: exp.meta.location,
|
location: exp.location,
|
||||||
description: exp.meta.description
|
description: exp.description
|
||||||
}))
|
}))
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user