From c17355fcd16dfa8e811b68f7b01a2cc71d429857 Mon Sep 17 00:00:00 2001 From: Julian Krauser Date: Wed, 7 May 2025 08:27:31 +0200 Subject: [PATCH] change: request method for account credential change --- src/components/account/ChangeToPassword.vue | 2 +- src/components/account/ChangeToTOTP.vue | 2 +- src/components/account/PasswordChange.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/account/ChangeToPassword.vue b/src/components/account/ChangeToPassword.vue index 86b7c8e..cbd14c7 100644 --- a/src/components/account/ChangeToPassword.vue +++ b/src/components/account/ChangeToPassword.vue @@ -84,7 +84,7 @@ export default defineComponent({ this.changeStatus = "loading"; this.changeError = ""; this.$http - .post(`/user/changeToPW`, { + .patch(`/user/changeToPW`, { newpassword: await hashString(formData.new.value), }) .then((result) => { diff --git a/src/components/account/ChangeToTOTP.vue b/src/components/account/ChangeToTOTP.vue index c04197c..3d5dab3 100644 --- a/src/components/account/ChangeToTOTP.vue +++ b/src/components/account/ChangeToTOTP.vue @@ -69,7 +69,7 @@ export default defineComponent({ this.verifyStatus = "loading"; this.verifyError = ""; this.$http - .post(`/user/changeToTOTP`, { + .patch(`/user/changeToTOTP`, { otp: this.otp, totp: formData.totp.value, }) diff --git a/src/components/account/PasswordChange.vue b/src/components/account/PasswordChange.vue index 268e5bc..eebd339 100644 --- a/src/components/account/PasswordChange.vue +++ b/src/components/account/PasswordChange.vue @@ -87,7 +87,7 @@ export default defineComponent({ this.changeStatus = "loading"; this.changeError = ""; this.$http - .post(`/user/changepw`, { + .patch(`/user/changepw`, { current: await hashString(formData.current.value), newpassword: await hashString(formData.new.value), })