Skip to content

Commit 1abd3bb

Browse files
committed
Directly call on /api without using PUBLIC_NEXT_APP_URL env var in paths
1 parent e38b7a2 commit 1abd3bb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/[orgId]/contests/[id]/problems/[problemId]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ async function getProblem(orgId: string, contestId: string, problemId: string) {
1212
try {
1313
// Fetch the problem with contest context
1414
const response = await fetch(
15-
`${process.env.NEXT_PUBLIC_APP_URL}/api/orgs/${orgId}/contests/${contestId}/problems/${problemId}`,
15+
`/api/orgs/${orgId}/contests/${contestId}/problems/${problemId}`,
1616
{
1717
cache: "no-store",
1818
},

app/[orgId]/problems/[id]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ async function getProblem(orgId: string, problemId: string) {
99
// const problemIdNumber = await getProblemIdFromCode(orgId, problemId);
1010

1111
const response = await fetch(
12-
`${process.env.NEXT_PUBLIC_APP_URL}/api/orgs/${orgId}/problems/${problemId}`,
12+
`/api/orgs/${orgId}/problems/${problemId}`,
1313
{
1414
cache: "no-store",
1515
},

0 commit comments

Comments
 (0)