refacto: servercomponent and first route for config

This commit is contained in:
Julien Froidefond
2025-02-14 12:51:03 +01:00
parent e3ad1690c5
commit bd652fc1ff
7 changed files with 62 additions and 137 deletions

View File

@@ -27,10 +27,11 @@ export class LibraryService extends BaseApiService {
): Promise<LibraryResponse<Series>> {
try {
const config = await this.getKomgaConfig();
const url = this.buildUrl(config, `libraries/${libraryId}/series`, {
const url = this.buildUrl(config, "series", {
library_id: libraryId,
page: page.toString(),
size: size.toString(),
...(unreadOnly && { read_status: "UNREAD" }),
...(unreadOnly && { read_status: "UNREAD,IN_PROGRESS" }),
});
const headers = this.getAuthHeaders(config);