feat: ajout de la fonctionnalité de récupération des chapitres de manga, avec mise à jour de l'API et des composants pour gérer la récupération asynchrone des chapitres, ainsi que des améliorations dans la gestion des erreurs et des tests associés.
This commit is contained in:
parent
5a5569cf2c
commit
ee2a9b3750
@@ -189,6 +189,22 @@ export const useMangaStore = defineStore('manga', {
|
||||
}
|
||||
},
|
||||
|
||||
async fetchMangaChapters(mangaId) {
|
||||
if (this.loadingChapters) return;
|
||||
this.loadingChapters = true;
|
||||
this.chaptersError = null;
|
||||
|
||||
try {
|
||||
await mangaRepository.fetchMangaChapters(mangaId);
|
||||
this.mangaChapters[mangaId] = chaptersData;
|
||||
console.log('Chapitres récupérés avec succès');
|
||||
} catch (err) {
|
||||
this.chaptersError = err.message;
|
||||
} finally {
|
||||
this.loadingChapters = false;
|
||||
}
|
||||
},
|
||||
|
||||
// --- Scrape Chapter Action ---
|
||||
async searchChapter(chapterId) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user