mirror of
https://github.com/thiloho/archtika.git
synced 2025-11-22 19:01:35 +01:00
17 lines
437 B
TypeScript
17 lines
437 B
TypeScript
|
|
export const load = async ({ params, fetch, cookies }) => {
|
||
|
|
const websiteData = await fetch(`http://localhost:3000/cms_content?id=eq.${params.websiteId}`, {
|
||
|
|
method: "GET",
|
||
|
|
headers: {
|
||
|
|
"Content-Type": "application/json",
|
||
|
|
Authorization: `Bearer ${cookies.get("session_token")}`,
|
||
|
|
Accept: "application/vnd.pgrst.object+json"
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
const website = await websiteData.json();
|
||
|
|
|
||
|
|
return {
|
||
|
|
website
|
||
|
|
};
|
||
|
|
};
|