From ddddf99b849a5c23f2523ccff6b872d6d5179740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E7=99=BB=E5=B1=B1?= Date: Fri, 31 Oct 2025 11:15:23 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=20change=20=20current=20user=20pas?= =?UTF-8?q?sword?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/access-keys/change-password.vue | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/components/access-keys/change-password.vue b/components/access-keys/change-password.vue index 0f738ea..961a745 100644 --- a/components/access-keys/change-password.vue +++ b/components/access-keys/change-password.vue @@ -7,6 +7,7 @@ import { Field, FieldContent, FieldDescription, FieldLabel } from '@/components/ import { computed, reactive, ref } from 'vue' import { useI18n } from 'vue-i18n' import Modal from '~/components/modal.vue' +const { createUser } = useUsers() const { t } = useI18n() @@ -85,9 +86,11 @@ async function submitForm() { submitting.value = true try { - await $api.post('/account/change-password', { - current_secret_key: formModel.current_secret_key, - new_secret_key: formModel.new_secret_key, + const userInfo = await $api.get(`/accountinfo`) + await createUser({ + accessKey: userInfo.account_name, + secretKey: formModel.new_secret_key, + status: 'enabled', }) message.success(t('Updated successfully')) closeModal() @@ -126,7 +129,13 @@ async function submitForm() { {{ t('Confirm New Password') }} - + {{ errors.re_new_secret_key }}