Switched frontend API calls to Nuxt
This commit is contained in:
1 parent
4621a81384
commit
47db7abd6a
5 files changed
+89
-69
No files matched your search
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user