Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions lib/stores/one.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export const useOneStore = defineStore('one', () => {

const auth = useAuthStore()
const http = useHttpStore()
const team = useTeamStore()

const isLoading = shallowRef(false)
const isOpen = shallowRef(false)
Expand Down Expand Up @@ -184,13 +183,13 @@ export const useOneStore = defineStore('one', () => {
try {
isLoading.value = true

const res = await http.post('/one/modify', {
await http.post('/one/modify', {
subscriptionId: subscription.value.tierName,
interval,
type,
})

auth.user = res.user
await auth.verify(true)
} catch (e) {
//
} finally {
Expand All @@ -204,12 +203,10 @@ export const useOneStore = defineStore('one', () => {
try {
isLoading.value = true

const res = await http.post(
`/one/verify?subscriptionId=${subscription.value?.tierName}`
)
auth.user = res.user
access.value = res.access
team.team = auth.user?.team ?? null
await http.post(
`/one/verify?subscriptionId=${subscription.value?.tierName}`)

await auth.verify(true)
} catch (e) {
//
} finally {
Expand Down