2019-11-19 06:37:36 +07:00
|
|
|
import { InitiateResetPasswordPath, CompleteResetPasswordPath, ResetPasswordPath } from "./Api";
|
|
|
|
import { PostWithOptionalResponse } from "./Client";
|
|
|
|
|
|
|
|
export async function initiateResetPasswordProcess(username: string) {
|
|
|
|
return PostWithOptionalResponse(InitiateResetPasswordPath, { username });
|
|
|
|
}
|
|
|
|
|
|
|
|
export async function completeResetPasswordProcess(token: string) {
|
|
|
|
return PostWithOptionalResponse(CompleteResetPasswordPath, { token });
|
|
|
|
}
|
|
|
|
|
|
|
|
export async function resetPassword(newPassword: string) {
|
|
|
|
return PostWithOptionalResponse(ResetPasswordPath, { password: newPassword });
|
2021-01-02 17:58:24 +07:00
|
|
|
}
|