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,6 +1,7 @@
import { handleFileUpload } from "$lib/server/utils.js";
import type { Actions, PageServerLoad } from "./$types";
export const load = async ({ params, fetch, cookies, url }) => {
export const load: PageServerLoad = async ({ params, fetch, cookies, url }) => {
const globalSettingsData = await fetch(
`http://localhost:3000/settings?website_id=eq.${params.websiteId}&select=*,media(*)`,
{
@@ -45,7 +46,7 @@ export const load = async ({ params, fetch, cookies, url }) => {
};
};
export const actions = {
export const actions: Actions = {
updateGlobal: async ({ request, fetch, cookies, params, locals }) => {
const data = await request.formData();