🚧 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:
2022-08-16 16:58:57 +02:00
parent 5e5c08ddd1
commit 6e904850aa
12 changed files with 131 additions and 92 deletions

View File

@@ -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}