From 563f3fb8ed25bb023827af6a73d70f98e8c4873e Mon Sep 17 00:00:00 2001 From: Linrador Date: Thu, 16 Oct 2025 17:12:58 +0200 Subject: [PATCH] push --- .env | 2 +- prisma/schema.prisma | 2 ++ src/app/[locale]/admin/teams/[teamId]/TeamAdminClient.tsx | 2 +- src/app/[locale]/components/MatchDetails.tsx | 2 +- src/app/[locale]/components/profile/[steamId]/Profile.tsx | 4 ++-- .../components/profile/[steamId]/matches/MatchesList.tsx | 2 +- src/app/[locale]/players/page.tsx | 2 +- src/app/[locale]/profile/[steamId]/stats/page.tsx | 2 +- src/lib/useSSEStore.ts | 2 +- 9 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.env b/.env index 6476931..8a76c09 100644 --- a/.env +++ b/.env @@ -20,7 +20,7 @@ PTERO_SERVER_SFTP_USER=army.37a11489 PTERO_SERVER_SFTP_PASSWORD=IJHoYHTXQvJkCxkycTYM PTERO_SERVER_ID=37a11489 -NEXT_PUBLIC_SSE_URL=http://127.0.0.1:8090 +NEXT_PUBLIC_SSE_URL=https://new.ironieopen.de/events # META (vom CS2-Server-Plugin) NEXT_PUBLIC_CS2_TELEMETRY_WS_HOST=new.ironieopen.de diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 57f0799..7f172df 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -1,6 +1,8 @@ generator client { provider = "prisma-client-js" output = "../src/generated/prisma" + binaryTargets = ["debian-openssl-3.0.x"] + } datasource db { diff --git a/src/app/[locale]/admin/teams/[teamId]/TeamAdminClient.tsx b/src/app/[locale]/admin/teams/[teamId]/TeamAdminClient.tsx index f655d12..9e76538 100644 --- a/src/app/[locale]/admin/teams/[teamId]/TeamAdminClient.tsx +++ b/src/app/[locale]/admin/teams/[teamId]/TeamAdminClient.tsx @@ -35,7 +35,7 @@ export default function TeamAdminClient({ teamId }: Props) { const steamId = session?.user?.steamId if (!steamId) return - const base = process.env.NEXT_PUBLIC_SSE_URL ?? 'http://localhost:3001' + const base = process.env.NEXT_PUBLIC_SSE_URL const url = `${base}/events?steamId=${encodeURIComponent(steamId)}` let es: EventSource | null = new EventSource(url, { withCredentials: false }) diff --git a/src/app/[locale]/components/MatchDetails.tsx b/src/app/[locale]/components/MatchDetails.tsx index 2088f91..22a603c 100644 --- a/src/app/[locale]/components/MatchDetails.tsx +++ b/src/app/[locale]/components/MatchDetails.tsx @@ -75,7 +75,7 @@ async function buildPlayerSummaryAndFaceit(steamId: string): Promise<{ faceit: PrefetchedFaceit | null }> { try { - const base = process.env.NEXT_PUBLIC_BASE_URL ?? '' + const base = process.env.NEXTAUTH_URL ?? '' const res = await fetch(`${base}/api/stats/${steamId}`, { cache: 'no-store', credentials: 'include' }) if (!res.ok) return { summary: null, faceit: null } diff --git a/src/app/[locale]/components/profile/[steamId]/Profile.tsx b/src/app/[locale]/components/profile/[steamId]/Profile.tsx index 7219ab6..5f52b8b 100644 --- a/src/app/[locale]/components/profile/[steamId]/Profile.tsx +++ b/src/app/[locale]/components/profile/[steamId]/Profile.tsx @@ -34,7 +34,7 @@ const kdTone = (v: number) => 'text-rose-300 bg-rose-500/10 ring-rose-400/20' async function getStats(steamId: string): Promise { - const base = process.env.NEXT_PUBLIC_BASE_URL ?? 'http://localhost:3000' + const base = process.env.NEXTAUTH_URL const res = await fetch(`${base}/api/stats/${steamId}`, { cache: 'no-store' }) if (!res.ok) return null return res.json() @@ -269,7 +269,7 @@ function getBanBadgeFromRow(m: MatchRow) { /* nur die letzten N holen */ async function getRecentMatches(steamId: string, n = 3) { - const base = process.env.NEXT_PUBLIC_BASE_URL ?? 'http://localhost:3000' + const base = process.env.NEXTAUTH_URL const res = await fetch(`${base}/api/user/${steamId}/matches?types=premier,competitive&limit=${n}`, { cache: 'no-store' }) if (!res.ok) return [] as MatchRow[] const json = await res.json() diff --git a/src/app/[locale]/components/profile/[steamId]/matches/MatchesList.tsx b/src/app/[locale]/components/profile/[steamId]/matches/MatchesList.tsx index fa8dac3..9ddcfca 100644 --- a/src/app/[locale]/components/profile/[steamId]/matches/MatchesList.tsx +++ b/src/app/[locale]/components/profile/[steamId]/matches/MatchesList.tsx @@ -158,7 +158,7 @@ function Pill({ label, value }: { label: string; value: string }) { /* data */ async function getData(steamId: string) { - const base = process.env.NEXT_PUBLIC_BASE_URL ?? 'http://localhost:3000' + const base = process.env.NEXTAUTH_URL const res = await fetch(`${base}/api/user/${steamId}/matches?types=premier,competitive`, { cache: 'no-store' }) if (!res.ok) return { matches: [] as MatchRow[] } const json = await res.json() diff --git a/src/app/[locale]/players/page.tsx b/src/app/[locale]/players/page.tsx index 326fe76..088ea7f 100644 --- a/src/app/[locale]/players/page.tsx +++ b/src/app/[locale]/players/page.tsx @@ -29,7 +29,7 @@ const fetcher = (url: string) => fetch(url, { cache: 'no-store' }).then(r => r.j async function fetchFaceitFor(steamId: string): Promise { try { - const base = process.env.NEXT_PUBLIC_BASE_URL ?? '' + const base = process.env.NEXTAUTH_URL ?? '' const res = await fetch(`${base}/api/stats/${steamId}`, { cache: 'no-store', credentials: 'include', diff --git a/src/app/[locale]/profile/[steamId]/stats/page.tsx b/src/app/[locale]/profile/[steamId]/stats/page.tsx index cda5ab6..14c0a0c 100644 --- a/src/app/[locale]/profile/[steamId]/stats/page.tsx +++ b/src/app/[locale]/profile/[steamId]/stats/page.tsx @@ -4,7 +4,7 @@ import { MatchStats } from '@/types/match' import type { AsyncParams } from '@/types/next' async function getStats(steamId: string) { - const base = process.env.NEXT_PUBLIC_BASE_URL ?? 'http://localhost:3000' + const base = process.env.NEXTAUTH_URL const res = await fetch(`${base}/api/stats/${steamId}`, { cache: 'no-store' }) if (!res.ok) return null return res.json() diff --git a/src/lib/useSSEStore.ts b/src/lib/useSSEStore.ts index 3fe5f63..2292e1b 100644 --- a/src/lib/useSSEStore.ts +++ b/src/lib/useSSEStore.ts @@ -84,7 +84,7 @@ export const useSSEStore = create((set, get) => { set({ source: null, isConnected: false }); } - const base = process.env.NEXT_PUBLIC_SSE_URL ?? 'http://localhost:3001'; + const base = process.env.NEXT_PUBLIC_SSE_URL const url = `${base}/events?steamId=${encodeURIComponent(steamId)}`; const source = new EventSource(url);