2025-04-07 12:02:55 +00:00
|
|
|
import { Injectable } from '@angular/core';
|
|
|
|
import { HttpClient } from '@angular/common/http';
|
2025-04-15 12:37:36 +00:00
|
|
|
import { environment } from '../enviroments/environment.cluster';
|
2025-04-07 12:02:55 +00:00
|
|
|
|
|
|
|
@Injectable({ providedIn: 'root' })
|
|
|
|
export class JumpService {
|
2025-04-15 12:37:36 +00:00
|
|
|
|
|
|
|
private apiUrl = environment.apiBaseUrl === ''
|
|
|
|
? 'http://localhost:8080/game/jump'
|
|
|
|
: environment.apiBaseUrl;
|
2025-04-07 12:02:55 +00:00
|
|
|
|
|
|
|
constructor(private http: HttpClient) {}
|
|
|
|
|
|
|
|
registerJump() {
|
|
|
|
return this.http.get<{ totalJumps: number }>(this.apiUrl, {});
|
|
|
|
}
|
|
|
|
}
|