Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/functions/[[path]].ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference types="@cloudflare/workers-types" />

interface Env {
API_ENDPOINT: string;
VITE_API_ENDPOINT: string;
}

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

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

if (!projectData) {
return response;
Expand Down
6 changes: 3 additions & 3 deletions client/wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ compatibility_date = "2024-12-01"
pages_build_output_dir = "./dist"

[env.production.vars]
API_ENDPOINT = "https://api.itsuhima.utcode.net"
VITE_API_ENDPOINT = "https://api.itsuhima.utcode.net"

[env.preview.vars]
API_ENDPOINT = ""
VITE_API_ENDPOINT = ""

[vars]
API_ENDPOINT = "http://localhost:3000"
VITE_API_ENDPOINT = "http://localhost:3000"