Migrate to rAuth v1.

This commit is contained in:
Paul
2021-09-11 17:36:23 +01:00
parent 2b883358f6
commit c40e4655f0
15 changed files with 116 additions and 87 deletions

View File

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