Switched frontend API calls to Nuxt

This commit is contained in:
lucast committed 2026-09-29 13:33:48 +02:00
1 parent 4621a81384
commit 47db7abd6a
5 files changed
+89 -69

No files matched your search

+2 -2
View File
@@ -147,7 +147,7 @@ const save = async (value: any) => {
return false
}
const albumResponse = await cfetch("/admin/album", {
const albumResponse = await cfetch<{ _id: string }>("/admin/album", {
method: "POST",
data: {
name: `${value.name} - Single`,
@@ -156,7 +156,7 @@ const save = async (value: any) => {
file: value.cover,
},
})
value.album = albumResponse.data._id
value.album = albumResponse._id
} else if (!value.album) {
toast.show(
"Choose an album or create a single album",