mirror of
https://github.com/BradNut/boredgame
synced 2025-09-08 17:40:22 +00:00
Fixing env in the game page.
This commit is contained in:
parent
036c821cb0
commit
79e401a917
3 changed files with 140 additions and 139 deletions
|
|
@ -8,7 +8,7 @@
|
||||||
(The data on the todo app will expire periodically; no
|
(The data on the todo app will expire periodically; no
|
||||||
guarantees are made. Don't use it to organize your life.)
|
guarantees are made. Don't use it to organize your life.)
|
||||||
*/
|
*/
|
||||||
|
import { BOARD_GAME_ATLAS_CLIENT_ID } from '$env/static/private';
|
||||||
import { URLSearchParams } from 'url';
|
import { URLSearchParams } from 'url';
|
||||||
|
|
||||||
const base = 'https://api.boardgameatlas.com/api';
|
const base = 'https://api.boardgameatlas.com/api';
|
||||||
|
|
@ -20,7 +20,7 @@ export function boardGameApi(
|
||||||
data?: Record<string, unknown>
|
data?: Record<string, unknown>
|
||||||
) {
|
) {
|
||||||
// console.log('queryParams', queryParams);
|
// console.log('queryParams', queryParams);
|
||||||
queryParams.client_id = import.meta.env.VITE_PUBLIC_CLIENT_ID;
|
queryParams.client_id = BOARD_GAME_ATLAS_CLIENT_ID;
|
||||||
const urlQueryParams = new URLSearchParams(queryParams);
|
const urlQueryParams = new URLSearchParams(queryParams);
|
||||||
const url = `${base}/${resource}${urlQueryParams ? `?${urlQueryParams}` : ''}`;
|
const url = `${base}/${resource}${urlQueryParams ? `?${urlQueryParams}` : ''}`;
|
||||||
return fetch(url, {
|
return fetch(url, {
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ type GamePageParams = {
|
||||||
|
|
||||||
export const load: PageServerLoad = async ({ params }: GamePageParams) => {
|
export const load: PageServerLoad = async ({ params }: GamePageParams) => {
|
||||||
console.log('params', params);
|
console.log('params', params);
|
||||||
|
debugger;
|
||||||
const queryParams = {
|
const queryParams = {
|
||||||
ids: `${params?.id}`
|
ids: `${params?.id}`
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue