diff --git a/src/app/[locale]/doc/page.tsx b/src/app/[locale]/doc/page.tsx index 9e61d42..41a9fcf 100644 --- a/src/app/[locale]/doc/page.tsx +++ b/src/app/[locale]/doc/page.tsx @@ -2,6 +2,7 @@ import { useState } from "react"; import { useSession } from "next-auth/react"; +import { env } from "process"; export default function GenerateKeyButton() { const [loading, setLoading] = useState(false); @@ -14,7 +15,7 @@ export default function GenerateKeyButton() { setResult(null); try { - const res = await fetch("http://localhost:3001/v1/keys/generate", { + const res = await fetch(env.NEXT_PUBLIC_API_URL! + "/keys/generate", { method: "POST", headers: { "Content-Type": "application/json",