🐛 (stripe) Fix plan update and management
This commit is contained in:
committed by
Baptiste Arnaud
parent
f83e0efea2
commit
6384a3adae
@ -35,7 +35,7 @@ export const ChangePlanForm = () => {
|
||||
selectedStorageLimitIndex === undefined
|
||||
)
|
||||
return
|
||||
await pay({
|
||||
const response = await pay({
|
||||
stripeId: workspace.stripeId ?? undefined,
|
||||
user,
|
||||
plan,
|
||||
@ -43,6 +43,10 @@ export const ChangePlanForm = () => {
|
||||
additionalChats: selectedChatsLimitIndex,
|
||||
additionalStorage: selectedStorageLimitIndex,
|
||||
})
|
||||
if (typeof response === 'object' && response?.error) {
|
||||
showToast({ description: response.error.message })
|
||||
return
|
||||
}
|
||||
refreshCurrentSubscriptionInfo({
|
||||
additionalChatsIndex: selectedChatsLimitIndex,
|
||||
additionalStorageIndex: selectedStorageLimitIndex,
|
||||
|
Reference in New Issue
Block a user