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 }}