Add frontend unit tests (Part 2)

This commit is contained in:
acx10
2026-01-06 15:16:26 -07:00
parent 81442a1e5c
commit f63a8641d8
47 changed files with 3994 additions and 97 deletions
@@ -0,0 +1,26 @@
import {inject, Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {Observable} from 'rxjs';
import {API_CONFIG} from '../../core/config/api-config';
export interface FileMoveRequest {
bookIds: number[];
moves: {
bookId: number;
targetLibraryId: number | null;
targetLibraryPathId: number | null;
}[];
}
@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);
}
}