Added reset password modal form

This commit is contained in:
2024-10-27 21:31:50 +01:00
parent a71890ab68
commit be854a79b8
5 changed files with 75 additions and 4 deletions

View File

@ -25,3 +25,12 @@ export async function login(username: string, password: string) {
return { error: error.response.data.message }
}
}
export async function resetPassword(email: string) {
try {
const response = await axios.post(`${config.server_endpoint}/reset-password`, { email })
return { success: true, token: response.data.token }
} catch (error: any) {
return { error: error.response.data.message }
}
}