Move API fetch data to different file

Sharing multiple exportable functions in one file impacts the use of private env variables 🤷
This commit is contained in:
2022-08-16 20:00:52 +02:00
parent 6e904850aa
commit 93a50770d0
16 changed files with 50 additions and 47 deletions

View File

@@ -1,6 +1,6 @@
import { error } from '@sveltejs/kit'
import type { PageServerLoad } from './$types'
import { fetchAPI } from '$utils/api'
import { fetchAPI } from '$utils/api/data'
import { getProducts } from '$utils/functions/swell'
export const load: PageServerLoad = async () => {

View File

@@ -1,6 +1,6 @@
import { error } from '@sveltejs/kit'
import type { PageServerLoad } from './$types'
import { fetchAPI } from '$utils/api'
import { fetchAPI } from '$utils/api/data'
import { getProduct } from '$utils/functions/swell'
import { getRandomItem } from '$utils/functions'

View File

@@ -1,6 +1,6 @@
import { error } from '@sveltejs/kit'
import type { PageServerLoad } from './$types'
import { fetchAPI } from '$utils/api'
import { fetchAPI } from '$utils/api/data'
import { getProduct } from '$utils/functions/swell'
export const load: PageServerLoad = async ({ params }) => {