412591dfe0
Servers are now env-var configured; the Servers dialog, add form, remove buttons, and TournamentServerService are all deleted. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
24 lines
623 B
TypeScript
24 lines
623 B
TypeScript
import { Injectable, inject } from '@angular/core';
|
|
import { HttpClient } from '@angular/common/http';
|
|
import { Observable } from 'rxjs';
|
|
|
|
export interface ExternalTournamentServer {
|
|
id: string;
|
|
label: string;
|
|
url: string;
|
|
}
|
|
|
|
export interface ExternalTournamentServerList {
|
|
servers: ExternalTournamentServer[];
|
|
}
|
|
|
|
@Injectable({ providedIn: 'root' })
|
|
export class TournamentServerService {
|
|
private readonly http = inject(HttpClient);
|
|
private readonly base = '/api/tournament/servers';
|
|
|
|
list(): Observable<ExternalTournamentServerList> {
|
|
return this.http.get<ExternalTournamentServerList>(this.base);
|
|
}
|
|
}
|