From d10abbc52f6f5e5615525c5347dcdff651b03175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ben=20B=C3=B6ckmann?= Date: Tue, 2 Apr 2024 16:41:29 +0200 Subject: [PATCH] fix: corrected all env urls --- .env.development | 7 +++++++ .env.local => .env.production | 0 src/lib/actions.ts | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .env.development rename .env.local => .env.production (100%) diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..a117331 --- /dev/null +++ b/.env.development @@ -0,0 +1,7 @@ +JWT_SECRET="2b343f1ffd059864aecfeb590a973e8e29c5914b6a30d1245ad1ef2e0c280c47" +JWT_EXPIRATION_MS=60000 +JWT_REFRESH_EXPIRATION_MS=1209600000 +REFRESH_DOMAIN="/refresh" +FRONTEND_DOMAIN="http://localhost:3000" +BACKEND_DOMAIN="https://meetmate.bencodes.de" +GRAPHQL_URL="http://localhost:8080/graphql" diff --git a/.env.local b/.env.production similarity index 100% rename from .env.local rename to .env.production diff --git a/src/lib/actions.ts b/src/lib/actions.ts index f3beafd..e4134e5 100644 --- a/src/lib/actions.ts +++ b/src/lib/actions.ts @@ -78,7 +78,7 @@ export async function refreshAccessToken() { // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents export async function getUser(): Promise { try { - const response = await fetch("http://localhost:3000/api/user/get", { + const response = await fetch(process.env.FRONTEND_DOMAIN + "/api/user/get", { method: "GET", headers: { "Content-Type": "application/json;charset=UTF-8",