[chore] Use satisfies syntax for server routes types
This commit is contained in:
@@ -3,11 +3,7 @@ import type { PageServerLoad } from './$types'
|
||||
import { fetchAPI } from '$utils/api'
|
||||
import { PUBLIC_FILTERS_DEFAULT_COUNTRY, PUBLIC_FILTERS_DEFAULT_SORT, PUBLIC_GRID_AMOUNT } from '$env/static/public'
|
||||
|
||||
|
||||
/**
|
||||
* Page Data
|
||||
*/
|
||||
export const load: PageServerLoad = async ({ url, setHeaders }) => {
|
||||
export const load = (async ({ url, setHeaders }) => {
|
||||
try {
|
||||
// Query parameters
|
||||
const queryCountry = url.searchParams.get('country') || PUBLIC_FILTERS_DEFAULT_COUNTRY
|
||||
@@ -88,4 +84,4 @@ export const load: PageServerLoad = async ({ url, setHeaders }) => {
|
||||
} catch (err) {
|
||||
throw error(500, err.message)
|
||||
}
|
||||
}
|
||||
}) satisfies PageServerLoad
|
||||
|
||||
Reference in New Issue
Block a user