diff --git a/frontend/src/routes/+page.js b/frontend/src/routes/+page.js new file mode 100644 index 0000000..3ea80af --- /dev/null +++ b/frontend/src/routes/+page.js @@ -0,0 +1,14 @@ +export async function load(context) { + const res = await context.fetch("http://0.0.0.0:8000/info"); + const info = await res.json(); + + if (!res.ok) { + return { + status: 500, + error: new Error("Internal Server Error"), + }; + } + return { + info, + }; +} diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte index 999d67c..3de68dd 100644 --- a/frontend/src/routes/+page.svelte +++ b/frontend/src/routes/+page.svelte @@ -1,7 +1,8 @@
-

Le super CV de {prenom}

+

Le super CV de {info.full_name}

\ No newline at end of file