From 2229cfd00a7d16daa6a9544c8940e792c4362dfb Mon Sep 17 00:00:00 2001 From: shahdlala66 Date: Tue, 23 Jun 2026 10:16:25 +0200 Subject: [PATCH] fix: api url --- src/app/services/tournament.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/services/tournament.service.ts b/src/app/services/tournament.service.ts index 289a27d..3803fbb 100644 --- a/src/app/services/tournament.service.ts +++ b/src/app/services/tournament.service.ts @@ -2,6 +2,7 @@ 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; @@ -14,7 +15,7 @@ export interface CreateTournamentForm { @Injectable({ providedIn: 'root' }) export class TournamentService { private readonly http = inject(HttpClient); - private readonly base = '/api/tournament'; + private readonly base = `${(environment.tournamentServerUrl ?? '').replace(/\/+$/, '')}/api/tournament`; list(): Observable { return this.http.get(this.base);