Clean up creatorProfileStore.js
This commit is contained in:
@@ -41,30 +41,15 @@ export const useCreatorProfileStore = defineStore(
|
|||||||
async function fetchCurrentCreatorProfile() {
|
async function fetchCurrentCreatorProfile() {
|
||||||
try {
|
try {
|
||||||
const creatorResponse = await client.get(`/api/creators/profile`);
|
const creatorResponse = await client.get(`/api/creators/profile`);
|
||||||
console.log('creatorProfile');
|
|
||||||
console.dir(creatorResponse.data)
|
|
||||||
value.value = creatorResponse.data;
|
value.value = creatorResponse.data;
|
||||||
console.dir(value.value);
|
|
||||||
// TODO: no cache-busting ???
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(`!!!`)
|
|
||||||
value.value = undefined;
|
value.value = undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function ConfigureStripeAccount() {
|
|
||||||
try {
|
|
||||||
await client.post(`/api/membership/stripe-account`);
|
|
||||||
return true;
|
|
||||||
} catch (error) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
creator: value,
|
creator: value,
|
||||||
hasCreator,
|
hasCreator,
|
||||||
fetchCurrentCreatorProfile,
|
fetchCurrentCreatorProfile
|
||||||
ConfigureStripeAccount,
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user