From bf58727cac6a5878e83c51b80ad53052110535a6 Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Wed, 17 Dec 2025 09:45:35 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20simplifier=20le=20traitement=20des=20do?= =?UTF-8?q?nn=C3=A9es=20d'=C3=A9ducation=20et=20d'exp=C3=A9rience=20en=20s?= =?UTF-8?q?upprimant=20les=20r=C3=A9f=C3=A9rences=20=C3=A0=20'meta'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/api/education.get.ts | 12 ++++++------ server/api/experiences.get.ts | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/server/api/education.get.ts b/server/api/education.get.ts index fc1deac..6dc569c 100644 --- a/server/api/education.get.ts +++ b/server/api/education.get.ts @@ -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, diff --git a/server/api/experiences.get.ts b/server/api/experiences.get.ts index 6e7bdaf..2d1b2b2 100644 --- a/server/api/experiences.get.ts +++ b/server/api/experiences.get.ts @@ -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 })) }, {