From 890c3fcecccec89e643180725e2a601f84fa5d99 Mon Sep 17 00:00:00 2001 From: Janis Date: Tue, 23 Jun 2026 14:52:31 +0200 Subject: [PATCH] fix: route tournament calls through backend gateway Use relative /api/tournament path instead of hardcoded http://141.37.123.132:8086. The browser was hitting the external tournament-server directly with the user's RS256 token, which it rejects. Routing through our backend lets it publish to the native server with the auto-registered director token. Co-Authored-By: Claude Opus 4.8 --- src/app/services/tournament.service.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/services/tournament.service.ts b/src/app/services/tournament.service.ts index 3803fbb..289a27d 100644 --- a/src/app/services/tournament.service.ts +++ b/src/app/services/tournament.service.ts @@ -2,7 +2,6 @@ import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpHeaders } from '@angular/common/http'; import { Observable } from 'rxjs'; import { Tournament, TournamentList, RoundPairings } from '../models/tournament.models'; -import { environment } from '../../environments/environment'; export interface CreateTournamentForm { name: string; @@ -15,7 +14,7 @@ export interface CreateTournamentForm { @Injectable({ providedIn: 'root' }) export class TournamentService { private readonly http = inject(HttpClient); - private readonly base = `${(environment.tournamentServerUrl ?? '').replace(/\/+$/, '')}/api/tournament`; + private readonly base = '/api/tournament'; list(): Observable { return this.http.get(this.base);