Skip to content

Commit 301625e

Browse files
committed
fix: fix error when deleting user accounts
1 parent 075f2b0 commit 301625e

3 files changed

Lines changed: 12 additions & 7 deletions

File tree

web/app/components/BackButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function goBack() {
3737
:block="block"
3838
@click="goBack"
3939
>
40-
<v-icon :icon="mdiArrowLeft" />
40+
<v-icon :icon="mdiArrowLeft" start />
4141
Go Back
4242
</v-btn>
4343
</template>

web/app/pages/settings/index.vue

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,8 @@ async function deleteUserAccount() {
780780
await router.push({ name: 'index' })
781781
} catch {
782782
notificationsStore.addNotification({
783-
message: 'Failed to delete your account',
783+
message:
784+
'We ran into an internal error while deleteing your account please contact us.',
784785
type: 'error',
785786
})
786787
} finally {
@@ -965,25 +966,29 @@ onMounted(async () => {
965966
</VBtn>
966967
</template>
967968
<VCard>
968-
<VCardTitle class="text-headline-medium text-break"
969+
<VCardTitle class="text-headline-small"
969970
>Are you sure you want to rotate your API Key?</VCardTitle
970971
>
971-
<VCardText>
972+
<VCardText class="text-medium-emphasis">
972973
You will have to logout and login again on the
973974
<b>httpSMS</b> Android app with your new API key after you
974975
rotate it.
975976
</VCardText>
976977
<VCardActions class="pb-4">
977978
<VBtn
978979
color="primary"
980+
variant="flat"
979981
:loading="rotatingApiKey"
980982
@click="rotateApiKey"
981983
>
982984
<VIcon start :icon="mdiRefresh" />
983985
Yes Rotate Key
984986
</VBtn>
985987
<VSpacer />
986-
<VBtn variant="text" @click="showRotateApiKey = false"
988+
<VBtn
989+
variant="text"
990+
color="warning"
991+
@click="showRotateApiKey = false"
987992
>Close</VBtn
988993
>
989994
</VCardActions>

web/app/stores/auth.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ export const useAuthStore = defineStore('auth', () => {
7474
}
7575

7676
async function deleteUserAccount(): Promise<string> {
77-
const response = await apiFetch<{ message: string }>('/v1/users/me', {
77+
await apiFetch<{ message: string }>('/v1/users/me', {
7878
method: 'DELETE',
7979
})
80-
return response.message
80+
return 'Your account has been deleted successfully'
8181
}
8282

8383
async function rotateApiKey(userId: string): Promise<EntitiesUser> {

0 commit comments

Comments
 (0)