fix: correction des URLs des images et nettoyage du code
This commit is contained in:
@@ -9,7 +9,7 @@ export class ImageService extends BaseApiService {
|
||||
static async getImage(path: string): Promise<ImageResponse> {
|
||||
try {
|
||||
const config = await this.getKomgaConfig();
|
||||
const url = this.buildUrl(config, path);
|
||||
const url = `${config.serverUrl}${path}`;
|
||||
const headers = this.getAuthHeaders(config);
|
||||
|
||||
// Ajout des headers pour accepter les images
|
||||
|
||||
@@ -13,7 +13,7 @@ export class SeriesService extends BaseApiService {
|
||||
return this.fetchWithCache<Series>(
|
||||
`series-${seriesId}`,
|
||||
async () => this.fetchFromApi<Series>(url, headers),
|
||||
5 * 60 // Cache de 5 minutes
|
||||
"SERIES"
|
||||
);
|
||||
} catch (error) {
|
||||
return this.handleError(error, "Impossible de récupérer la série");
|
||||
@@ -39,7 +39,7 @@ export class SeriesService extends BaseApiService {
|
||||
return this.fetchWithCache<LibraryResponse<KomgaBook>>(
|
||||
`series-${seriesId}-books-${page}-${size}-${unreadOnly}`,
|
||||
async () => this.fetchFromApi<LibraryResponse<KomgaBook>>(url, headers),
|
||||
5 * 60 // Cache de 5 minutes
|
||||
"BOOKS"
|
||||
);
|
||||
} catch (error) {
|
||||
return this.handleError(error, "Impossible de récupérer les tomes");
|
||||
|
||||
Reference in New Issue
Block a user