Files
morten-olsen.github.io/src/pages/resume.json.ts
Morten Olsen 5f79c8da43 init
2023-10-30 11:24:20 +01:00

21 lines
501 B
TypeScript

import { getCollection } from 'astro:content';
import { basics, skills, languages } from '../data/profile';
export async function GET(context: any) {
const work = await getCollection('work');
const references = await getCollection('references');
const resume = {
...basics,
skills,
languages,
work: work.map((item) => ({
...item.data,
})),
references: references.map((item) => ({
...item.data,
})),
}
return new Response(JSON.stringify(resume));
};