[chore] Use satisfies syntax for server routes types

This commit is contained in:
2023-01-10 13:02:19 +01:00
parent 25bb949a13
commit 47ea21569d
16 changed files with 35 additions and 48 deletions

View File

@@ -2,11 +2,7 @@ import { error } from '@sveltejs/kit'
import type { PageServerLoad } from './$types'
import { fetchAPI } from '$utils/api'
/**
* Page Data
*/
export const load: PageServerLoad = async ({ setHeaders }) => {
export const load = (async ({ setHeaders }) => {
try {
const res = await fetchAPI(`query {
settings {
@@ -39,4 +35,4 @@ export const load: PageServerLoad = async ({ setHeaders }) => {
} catch (err) {
throw error(500, err.message)
}
}
}) satisfies PageServerLoad