Skip to content

Commit fd6b551

Browse files
committed
fix: env name
1 parent 9c64b55 commit fd6b551

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

client/functions/[[path]].ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference types="@cloudflare/workers-types" />
22

33
interface Env {
4-
API_ENDPOINT: string;
4+
VITE_API_ENDPOINT: string;
55
}
66

77
interface ProjectData {
@@ -124,7 +124,7 @@ export async function onRequest(context: EventContext<Env, any, any>): Promise<R
124124
}
125125

126126
// プロジェクト情報を取得
127-
const projectData = await fetchProjectData(eventId, env.API_ENDPOINT);
127+
const projectData = await fetchProjectData(eventId, env.VITE_API_ENDPOINT);
128128

129129
if (!projectData) {
130130
return response;

client/wrangler.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ compatibility_date = "2024-12-01"
44
pages_build_output_dir = "./dist"
55

66
[env.production.vars]
7-
API_ENDPOINT = "https://api.itsuhima.utcode.net"
7+
VITE_API_ENDPOINT = "https://api.itsuhima.utcode.net"
88

99
[env.preview.vars]
10-
API_ENDPOINT = ""
10+
VITE_API_ENDPOINT = ""
1111

1212
[vars]
13-
API_ENDPOINT = "http://localhost:3000"
13+
VITE_API_ENDPOINT = "http://localhost:3000"

0 commit comments

Comments
 (0)