refactor: swap logic around
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
This commit is contained in:
parent
eda1df19dc
commit
7a3555a48c
10
src/App.vue
10
src/App.vue
@ -46,8 +46,8 @@ import {useBodyClass} from '@/composables/useBodyClass'
|
||||
import AddToHomeScreen from '@/components/home/AddToHomeScreen.vue'
|
||||
import DemoMode from '@/components/home/DemoMode.vue'
|
||||
|
||||
const importAccountDeleteService = async () => (await import('@/services/accountDelete')).default
|
||||
const importSuccess = async () => (await import('@/message')).success
|
||||
const importAccountDeleteService = () => import('@/services/accountDelete')
|
||||
const importMessage = () => import('@/message')
|
||||
|
||||
const baseStore = useBaseStore()
|
||||
const authStore = useAuthStore()
|
||||
@ -69,11 +69,11 @@ watch(accountDeletionConfirm, async (accountDeletionConfirm) => {
|
||||
return
|
||||
}
|
||||
|
||||
const successP = importSuccess()
|
||||
const AccountDeleteService = await importAccountDeleteService()
|
||||
const messageP = importMessage()
|
||||
const AccountDeleteService = (await importAccountDeleteService()).default
|
||||
const accountDeletionService = new AccountDeleteService()
|
||||
await accountDeletionService.confirm(accountDeletionConfirm)
|
||||
const success = await successP
|
||||
const {success} = await messageP
|
||||
success({message: t('user.deletion.confirmSuccess')})
|
||||
authStore.refreshUserInfo()
|
||||
}, { immediate: true })
|
||||
|
Reference in New Issue
Block a user