refactor: get rid of page data types
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import { error } from '@sveltejs/kit'
|
||||
import type { PageServerLoad } from './$types'
|
||||
import { fetchAPI } from '$utils/api'
|
||||
|
||||
|
||||
export const load = (async ({ setHeaders }) => {
|
||||
export const load = async ({ setHeaders }) => {
|
||||
try {
|
||||
const res = await fetchAPI(`query {
|
||||
settings {
|
||||
@@ -36,4 +35,4 @@ export const load = (async ({ setHeaders }) => {
|
||||
} catch (err) {
|
||||
throw error(500, err.message)
|
||||
}
|
||||
}) satisfies PageServerLoad
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user