From 537af45e71d8f8d0c3e761b5e77e245450cbe288 Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Fri, 20 Oct 2023 00:13:21 +0200 Subject: [PATCH] chore: lint on SkApprovalUser --- .../src/components/SkApprovalUser.vue | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/frontend/src/components/SkApprovalUser.vue b/packages/frontend/src/components/SkApprovalUser.vue index 332997ca6..39987272c 100644 --- a/packages/frontend/src/components/SkApprovalUser.vue +++ b/packages/frontend/src/components/SkApprovalUser.vue @@ -19,8 +19,8 @@
- {{ i18n.ts.approveAccount }} - {{ i18n.ts.denyAccount }} + {{ i18n.ts.approveAccount }} + {{ i18n.ts.denyAccount }}
@@ -54,7 +54,7 @@ const emits = defineEmits<{ (event: 'deleted', value: string): void; }>(); -async function deleteAccount(user) { +async function deleteAccount() { const confirm = await os.confirm({ type: 'warning', text: i18n.ts.deleteAccountConfirm, @@ -62,15 +62,15 @@ async function deleteAccount(user) { if (confirm.canceled) return; const typed = await os.inputText({ - text: i18n.t('typeToConfirm', { x: user?.username }), + text: i18n.t('typeToConfirm', { x: props.user.username }), }); if (typed.canceled) return; - if (typed.result === user?.username) { + if (typed.result === props.user.username) { await os.apiWithDialog('admin/delete-account', { - userId: user.id, + userId: props.user.id, }); - emits('deleted', user.id); + emits('deleted', props.user.id); } else { os.alert({ type: 'error', @@ -79,14 +79,14 @@ async function deleteAccount(user) { } } -async function approveAccount(user) { +async function approveAccount() { const confirm = await os.confirm({ type: 'warning', text: i18n.ts.approveConfirm, }); if (confirm.canceled) return; - await os.api('admin/approve-user', { userId: user.id }); - emits('deleted', user.id); + await os.api('admin/approve-user', { userId: props.user.id }); + emits('deleted', props.user.id); } @@ -111,4 +111,4 @@ async function approveAccount(user) { display: flex; gap: 8px; } - \ No newline at end of file +