Abgleich in der README beschreiben und Adresse konfigurierbar machen

Der Abgleich liest GExtension-Profile und ist auf deren Seitenaufbau gebaut.
Damit niemand in einer anderen Community lange sucht, warum nichts passiert,
steht das jetzt als Warnhinweis am Anfang des Abschnitts: bei einer anderen
GExtension-Instanz reicht GEXTENSION_BASE_URL, bei einem voellig anderen
Shop-System muesste der Parser angepasst werden. Der Rest der App laeuft
unabhaengig davon.

Die Adresse war bisher fest im Code verdrahtet und kommt jetzt aus der
Umgebung. Der Parser selbst bleibt frei von Konfiguration und Datenbank,
damit er ohne beides testbar ist - die Adresse reicht der Service durch.
This commit is contained in:
2026-09-18 15:48:21 +02:00
parent c242e73c38
commit 7876e29b90
6 changed files with 76 additions and 5 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import { ImportStatus, type Prisma } from '@prisma/client';
import { prisma } from '../db.js';
import { env } from '../env.js';
import { badRequest } from '../errors.js';
import {
classifyPackage,
@@ -59,7 +60,7 @@ export async function scrapePlayers(
for (const target of targets) {
let profile: ScrapedProfile;
try {
profile = await fetchProfile(target.steamId);
profile = await fetchProfile(target.steamId, { baseUrl: env.GEXTENSION_BASE_URL });
summary.scannedPlayers += 1;
} catch (error) {
summary.failedPlayers.push({