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