Add new update mech
All checks were successful
ci / Image build (push) Successful in 1m57s
ci / Deployment (push) Successful in 5s

This commit is contained in:
Joris Bertomeu
2024-10-01 17:44:55 +02:00
parent 8a1013f761
commit abcb3f9159
6 changed files with 117 additions and 22 deletions

View File

@@ -1,12 +1,13 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { environment } from '../environments/environment';
@Injectable({
providedIn: 'root'
})
export class VideoProcessingService {
private apiUrl = '/api';
private apiUrl = environment.serviceEndpoint;
constructor(private http: HttpClient) { }
@@ -18,6 +19,14 @@ export class VideoProcessingService {
return this.http.get<Array<any>>(`${this.apiUrl}/jobs-status`);
}
hello(): Observable<Array<any>> {
return this.http.get<any>(`${this.apiUrl}/hello`);
}
processUpdate(data: any): Observable<any> {
return this.http.post<any>(`${this.apiUrl}/processUpdate`, data);
}
downloadFile(filePath: string): Observable<Blob> {
return this.http.get(`${this.apiUrl}/download/${filePath}`, { responseType: 'blob' });
}