Support File Move Operations with Watcher Refactor for Accurate Tracking
This commit is contained in:
committed by
Aditya Chandel
parent
1c9c09628a
commit
841e359b92
@@ -0,0 +1,22 @@
|
||||
import {inject, Injectable} from '@angular/core';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {Observable} from 'rxjs';
|
||||
import {API_CONFIG} from './config/api-config';
|
||||
|
||||
export interface FileMoveRequest {
|
||||
bookIds: number[];
|
||||
pattern: string;
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class FileOperationsService {
|
||||
private readonly baseUrl = `${API_CONFIG.BASE_URL}/api/v1/files`;
|
||||
|
||||
private http = inject(HttpClient);
|
||||
|
||||
moveFiles(request: FileMoveRequest): Observable<void> {
|
||||
return this.http.post<void>(`${this.baseUrl}/move`, request);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user