feat: refactor reset password api and forgetPage.js (#1601)

This commit is contained in:
Yaodong Yu
2023-03-01 15:57:42 +08:00
committed by GitHub
parent b38f2218a3
commit e21087aa50
9 changed files with 539 additions and 340 deletions

View File

@ -36,11 +36,10 @@ export function signup(values) {
}).then(res => res.json());
}
export function getEmailAndPhone(values) {
return fetch(`${authConfig.serverUrl}/api/get-email-and-phone`, {
method: "POST",
export function getEmailAndPhone(organization, username) {
return fetch(`${authConfig.serverUrl}/api/get-email-and-phone?organization=${organization}&username=${username}`, {
method: "GET",
credentials: "include",
body: JSON.stringify(values),
headers: {
"Accept-Language": Setting.getAcceptLanguage(),
},