You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
752 B
38 lines
752 B
|
2 years ago
|
|
||
|
|
import { Injectable } from '@angular/core';
|
||
|
|
import { HttpClient } from '@angular/common/http';
|
||
|
|
|
||
|
|
@Injectable({
|
||
|
|
providedIn: 'root'
|
||
|
|
})
|
||
|
2 years ago
|
|
||
|
|
export class ApiService
|
||
|
|
{
|
||
|
2 years ago
|
server_route = 'http://localhost:3000'
|
||
|
2 years ago
|
|
||
|
2 years ago
|
constructor(private http: HttpClient) { }
|
||
|
2 years ago
|
|
||
|
|
getMessage()
|
||
|
|
{
|
||
|
2 years ago
|
return this.http.get(
|
||
|
|
'http://localhost:3000/api/message');
|
||
|
|
}
|
||
|
2 years ago
|
|
||
|
|
postReplayUpload(file: any)
|
||
|
|
{
|
||
|
2 years ago
|
return this.http.post(
|
||
|
|
this.server_route+'/api/upload-replay', file);
|
||
|
|
}
|
||
|
2 years ago
|
|
||
|
|
getSeasons()
|
||
|
|
{
|
||
|
|
return this.http.get(
|
||
|
|
this.server_route+'/api/seasons');
|
||
|
|
}
|
||
|
|
|
||
|
|
getSeasonDetails(id: number)
|
||
|
|
{
|
||
|
|
return this.http.get(
|
||
|
|
this.server_route+'/api/seasons/'+id);
|
||
|
|
}
|
||
|
2 years ago
|
}
|