Fix useFetch misuse (use $fetch instead)

This commit is contained in:
2025-10-14 14:21:20 +02:00
parent 6a5bf947a1
commit a01dc430e6
8 changed files with 31 additions and 14 deletions

View File

@@ -24,6 +24,8 @@
</template>
<script setup lang="ts">
const { $api } = useNuxtApp();
export interface LibrarySelectProps {
mangaId: string;
libraryId?: string;
@@ -38,7 +40,7 @@ const loading = ref(false);
const onLibrarySelectChange = async () => {
if (!library.value) return;
loading.value = true;
await useApi('/v2/Manga/{MangaId}/ChangeLibrary/{LibraryId}', {
await $api('/v2/Manga/{MangaId}/ChangeLibrary/{LibraryId}', {
method: 'POST',
path: { MangaId: props.mangaId, LibraryId: library.value },
});