Fix creation of creators
This commit is contained in:
@@ -42,6 +42,7 @@ export const useCreatorProfileStore = defineStore(
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
creator: value,
|
creator: value,
|
||||||
hasCreator
|
hasCreator,
|
||||||
|
fetchCurrentCreatorProfile
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -31,18 +31,20 @@ async function requestAccept(creatorName) {
|
|||||||
const response = await client.post(
|
const response = await client.post(
|
||||||
'/api/creators',
|
'/api/creators',
|
||||||
{
|
{
|
||||||
'creatorId': userProfileStore.value.id,
|
'creatorId': userProfileStore.user.id,
|
||||||
'name': creatorName
|
'name': creatorName
|
||||||
})
|
})
|
||||||
if (response.status >= 200 && response.status < 300) {
|
if (response.status >= 200 && response.status < 300) {
|
||||||
await creatorProfileStore.fetchCurrentCreatorProfile()
|
currentComponent.value = null
|
||||||
dialog.value = false
|
dialog.value = false
|
||||||
|
await creatorProfileStore.fetchCurrentCreatorProfile()
|
||||||
} else {
|
} else {
|
||||||
console.log(`An issue while creating the creator: ${response.statusText}`)
|
console.log(`An issue while creating the creator: ${response.statusText}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function requestCancel() {
|
function requestCancel() {
|
||||||
|
currentComponent.value = null
|
||||||
dialog.value = false
|
dialog.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user