Implement live progress tracking for bulk metadata refresh (remaining books, status, cancel support)

This commit is contained in:
aditya.chandel
2025-08-10 00:28:20 -06:00
committed by Aditya Chandel
parent 2c078716bf
commit b1508493cf
23 changed files with 586 additions and 112 deletions
@@ -0,0 +1,17 @@
import {Injectable, inject} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {Observable} from 'rxjs';
import {API_CONFIG} from '../../config/api-config';
@Injectable({
providedIn: 'root'
})
export class TaskService {
private http = inject(HttpClient);
private readonly url = `${API_CONFIG.BASE_URL}/api/v1/tasks`;
cancelTask(taskId: string): Observable<{ message: string }> {
return this.http.delete<{ message: string }>(`${this.url}/${taskId}`);
}
}