I'm tired

This commit is contained in:
Eclypsed
2024-02-04 01:01:37 -05:00
parent cbe9b60973
commit c710f80178
8 changed files with 279 additions and 36 deletions

View File

@@ -0,0 +1,12 @@
import { SECRET_INTERNAL_API_KEY } from '$env/static/private'
import type { PageServerLoad } from './$types'
export const prerender = false
export const load: PageServerLoad = async ({ locals, fetch, url }) => {
const recommendationResponse = await fetch(`/api/users/${locals.user.id}/recommendations`, { headers: { apikey: SECRET_INTERNAL_API_KEY } })
const recommendationData = await recommendationResponse.json()
const { recommendations } = recommendationData
return { recommendations }
}