Fix change email / password.

This commit is contained in:
Paul 2021-09-13 16:41:47 +01:00
parent 8da6f87efb
commit 52875ab197
3 changed files with 7 additions and 7 deletions

View file

@ -121,7 +121,7 @@
"react-virtuoso": "^1.10.4", "react-virtuoso": "^1.10.4",
"redux": "^4.1.0", "redux": "^4.1.0",
"revolt-api": "0.5.3-alpha.0-patch.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", "rimraf": "^3.0.2",
"sass": "^1.35.1", "sass": "^1.35.1",
"shade-blend-color": "^1.0.0", "shade-blend-color": "^1.0.0",

View file

@ -39,13 +39,13 @@ export function ModifyAccountModal({ onClose, field }: Props) {
}) => { }) => {
try { try {
if (field === "email") { if (field === "email") {
await client.req("POST", "/auth/account/change/email", { await client.req("PATCH", "/auth/account/change/email", {
current_password: password, current_password: password,
email: new_email, email: new_email,
}); });
onClose(); onClose();
} else if (field === "password") { } else if (field === "password") {
await client.req("POST", "/auth/account/change/password", { await client.req("PATCH", "/auth/account/change/password", {
current_password: password, current_password: password,
password: new_password, password: new_password,
}); });

View file

@ -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" resolved "https://registry.yarnpkg.com/revolt-api/-/revolt-api-0.5.3-alpha.0-patch.0.tgz#158556832843bb06cb06a4df50ffca24ab64be3b"
integrity sha512-76l+kGyrUy6uGMSIziyAHE27r9gD97OEh5gSzb2OJRsQM55TN0NurAsfFIEiB9hUzDDlwsXchtJiqdS4UVAwQw== integrity sha512-76l+kGyrUy6uGMSIziyAHE27r9gD97OEh5gSzb2OJRsQM55TN0NurAsfFIEiB9hUzDDlwsXchtJiqdS4UVAwQw==
revolt.js@5.1.0-alpha.0-patch.0: revolt.js@5.1.0-alpha.0-patch.1:
version "5.1.0-alpha.0-patch.0" version "5.1.0-alpha.0-patch.1"
resolved "https://registry.yarnpkg.com/revolt.js/-/revolt.js-5.1.0-alpha.0-patch.0.tgz#3d62f32d657ee1f44381018251a6682c81cf21d8" resolved "https://registry.yarnpkg.com/revolt.js/-/revolt.js-5.1.0-alpha.0-patch.1.tgz#68fd28af78a8b0b60cc2ed3523d8e9fbfa15a903"
integrity sha512-om61mNeVWiGc6+XFPpK2YM6i6QSOT3f5prhVyM78BcZZ5U2L39SWBN3S7ycAsr8g4Q9pPLv50qYwnsMjxe4P/A== integrity sha512-VanPjG6vZGoFGNfRFGyj7PTstJeniE/Fly5KNhz7bTIzHkxn7xtsLEE+EKeEpZY4Y9km+l09qav1/VfIZUm9NA==
dependencies: dependencies:
axios "^0.19.2" axios "^0.19.2"
eventemitter3 "^4.0.7" eventemitter3 "^4.0.7"