feat: use api enpoints
CI / CI - Validation Technique (push) Successful in 35s
Publish & Deploy (Versioned) / Build and Push Docker Image (push) Successful in 29s
Publish & Deploy (Versioned) / Deploy via SSH (push) Successful in 8s

This commit is contained in:
2026-05-07 20:17:46 +02:00
parent 7a910b3d8f
commit ca3abb19e1
+2 -1
View File
@@ -2,6 +2,7 @@
import { useState } from "react"; import { useState } from "react";
import { useSession } from "next-auth/react"; import { useSession } from "next-auth/react";
import { env } from "process";
export default function GenerateKeyButton() { export default function GenerateKeyButton() {
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
@@ -14,7 +15,7 @@ export default function GenerateKeyButton() {
setResult(null); setResult(null);
try { try {
const res = await fetch("http://localhost:3001/v1/keys/generate", { const res = await fetch(env.NEXT_PUBLIC_API_URL! + "/keys/generate", {
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",