password reset

This commit is contained in:
Peter Hoppe
2023-02-09 16:50:36 +01:00
parent 9256000f9d
commit e3e99e67f9
4 changed files with 126 additions and 3 deletions

View File

@ -239,7 +239,15 @@ export const logOut = () =>
})
.catch((err) => console.error(err));
}
/**
*
* @param form_data {
password1: string,
password2: string,
passwordToken: string
}
* @returns
*/
export const passwordReset = async (form_data:
FormData) =>
{
@ -256,6 +264,26 @@ export const passwordReset = async (form_data:
}
}
/**
*
* @param pwtoken object {'pwtoken': pwtoken }
* @returns
*/
export const getPwToken = async (pwtoken: any) =>
{
try
{
const {data} = await Axios.post('getPwToken.php', pwtoken);
console.log('Api getPwToken');
console.log(data);
return data;
}
catch(err)
{
return {success:0, message:'getPwToken Server Error!'};
}
}
export const wantNewPw = async ({email}:{email: string}) =>
{
try