refactor: get rid of page data types

This commit is contained in:
2023-05-26 23:47:08 +02:00
parent 422727586e
commit 685d4fd244
28 changed files with 44 additions and 72 deletions

View File

@@ -1,9 +1,8 @@
import { error } from '@sveltejs/kit'
import type { RequestHandler } from './$types'
import { fetchAPI } from '$utils/api'
export const GET = (async ({ url, setHeaders }) => {
export const GET = async ({ url, setHeaders }) => {
try {
const locations = []
const products = []
@@ -72,7 +71,7 @@ export const GET = (async ({ url, setHeaders }) => {
} catch (err) {
throw error(500, err.message)
}
}) satisfies RequestHandler
}
const render = (origin: string, pages: any[]) => {