Added reset password modal form
This commit is contained in:
@ -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 }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user