🚧 Migrate env variables to use internal SvelteKit system
Some API fetching function rewriting needed as privates cannot be included into public code
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { error } from '@sveltejs/kit'
|
||||
import type { PageServerLoad } from './$types'
|
||||
import { PUBLIC_LIST_AMOUNT } from '$env/static/public'
|
||||
import { fetchAPI } from '$utils/api'
|
||||
|
||||
export const photoFields = `
|
||||
@@ -56,7 +57,7 @@ export const load: PageServerLoad = async ({ params }) => {
|
||||
location: { slug: { _eq: "${slug}" }}
|
||||
},
|
||||
sort: "-date_created",
|
||||
limit: ${import.meta.env.VITE_LIST_AMOUNT},
|
||||
limit: ${PUBLIC_LIST_AMOUNT},
|
||||
page: 1,
|
||||
) {
|
||||
${photoFields}
|
||||
|
||||
Reference in New Issue
Block a user