Explicitely define server load and action types

This commit is contained in:
Thilo Hohlt
2024-08-05 14:38:44 +02:00
parent 2b3f0a80d2
commit fa500cf376
20 changed files with 55 additions and 27 deletions

View File

@@ -1,4 +1,6 @@
export const load = async ({ params, fetch, cookies }) => {
import type { LayoutServerLoad } from "./$types";
export const load: LayoutServerLoad = async ({ params, fetch, cookies }) => {
const websiteData = await fetch(`http://localhost:3000/website?id=eq.${params.websiteId}`, {
method: "GET",
headers: {