Skip to content

Commit

Permalink
fix(stats): update API endpoint to use relative path for fetching data
Browse files Browse the repository at this point in the history
  • Loading branch information
DarthGigi committed Dec 17, 2024
1 parent 362b3ba commit 85a6b72
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/routes/stats/[ign]/[[profile]]/+page.server.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import type { PageServerLoad } from "./$types";

const baseAPI = "http://localhost:5173/api/stats";

export const load = (async ({ params, fetch }) => {
const { ign, profile } = params;

const data = fetch(`${baseAPI}/${ign}/${profile}`)
const data = fetch(`/api/stats/${ign}/${profile}`)
.then((res) => res.json())
.catch((err) => {
console.error(err);
Expand Down

0 comments on commit 85a6b72

Please sign in to comment.