feat: page MangaDetails en vue.js

This commit is contained in:
ext.jeremy.guillot@maxicoffee.domains
2025-03-24 18:01:24 +01:00
parent bee8572dc5
commit 41dc3c51aa
10 changed files with 477 additions and 135 deletions

View File

@@ -0,0 +1,17 @@
export class MangaApi {
static async fetchById(mangaId) {
const response = await fetch(`/api/mangas/${mangaId}`);
if (!response.ok) {
throw new Error('Failed to fetch manga details');
}
return response.json();
}
static async fetchChapters(mangaId) {
const response = await fetch(`/api/mangas/${mangaId}/chapters`);
if (!response.ok) {
throw new Error('Failed to fetch manga chapters');
}
return response.json();
}
}