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.
 
 
 
 
 

28 lines
931 B

import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from "@angular/common/http";
import { Observable } from "rxjs";
import { ServerEndpointService } from './server-endpoint.service';
@Injectable({
providedIn: 'root'
})
export class ReplaysService {
constructor(
private httpClient: HttpClient,
private serverEndpointService: ServerEndpointService
) {
}
uploadReplay(newReplay: FormData) {
const headers = new HttpHeaders();
headers.append('Content-Type', 'multipart/form-data');
return this.httpClient.post(this.serverEndpointService.getCurrentEndpoint()+"upload/replay", newReplay, { headers });
}
claimRacer(newReplay: FormData) {
const headers = new HttpHeaders();
headers.append('Content-Type', 'multipart/form-data');
return this.httpClient.post(this.serverEndpointService.getCurrentEndpoint()+"upload/claim-racer", newReplay, { headers });
}
}