From 52875ab1978734abbe9065b9914a2e951564c4a0 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 13 Sep 2021 16:41:47 +0100 Subject: [PATCH] Fix change email / password. --- package.json | 2 +- src/context/intermediate/popovers/ModifyAccount.tsx | 4 ++-- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index c5c9dc72..1ec562d2 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,7 @@ "react-virtuoso": "^1.10.4", "redux": "^4.1.0", "revolt-api": "0.5.3-alpha.0-patch.0", - "revolt.js": "5.1.0-alpha.0-patch.0", + "revolt.js": "5.1.0-alpha.0-patch.1", "rimraf": "^3.0.2", "sass": "^1.35.1", "shade-blend-color": "^1.0.0", diff --git a/src/context/intermediate/popovers/ModifyAccount.tsx b/src/context/intermediate/popovers/ModifyAccount.tsx index dad643fe..4c2e68a8 100644 --- a/src/context/intermediate/popovers/ModifyAccount.tsx +++ b/src/context/intermediate/popovers/ModifyAccount.tsx @@ -39,13 +39,13 @@ export function ModifyAccountModal({ onClose, field }: Props) { }) => { try { if (field === "email") { - await client.req("POST", "/auth/account/change/email", { + await client.req("PATCH", "/auth/account/change/email", { current_password: password, email: new_email, }); onClose(); } else if (field === "password") { - await client.req("POST", "/auth/account/change/password", { + await client.req("PATCH", "/auth/account/change/password", { current_password: password, password: new_password, }); diff --git a/yarn.lock b/yarn.lock index af8f1af1..4b1a0d67 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3659,10 +3659,10 @@ revolt-api@0.5.3-alpha.0-patch.0: resolved "https://registry.yarnpkg.com/revolt-api/-/revolt-api-0.5.3-alpha.0-patch.0.tgz#158556832843bb06cb06a4df50ffca24ab64be3b" integrity sha512-76l+kGyrUy6uGMSIziyAHE27r9gD97OEh5gSzb2OJRsQM55TN0NurAsfFIEiB9hUzDDlwsXchtJiqdS4UVAwQw== -revolt.js@5.1.0-alpha.0-patch.0: - version "5.1.0-alpha.0-patch.0" - resolved "https://registry.yarnpkg.com/revolt.js/-/revolt.js-5.1.0-alpha.0-patch.0.tgz#3d62f32d657ee1f44381018251a6682c81cf21d8" - integrity sha512-om61mNeVWiGc6+XFPpK2YM6i6QSOT3f5prhVyM78BcZZ5U2L39SWBN3S7ycAsr8g4Q9pPLv50qYwnsMjxe4P/A== +revolt.js@5.1.0-alpha.0-patch.1: + version "5.1.0-alpha.0-patch.1" + resolved "https://registry.yarnpkg.com/revolt.js/-/revolt.js-5.1.0-alpha.0-patch.1.tgz#68fd28af78a8b0b60cc2ed3523d8e9fbfa15a903" + integrity sha512-VanPjG6vZGoFGNfRFGyj7PTstJeniE/Fly5KNhz7bTIzHkxn7xtsLEE+EKeEpZY4Y9km+l09qav1/VfIZUm9NA== dependencies: axios "^0.19.2" eventemitter3 "^4.0.7"