DataScope26/WEB
0
1import axiosClient from "./axiosClient.js";2 3export const requestPasswordRecoveryCode = async (email) => {4 try {5 return await axiosClient.put("/forgot-password", { email });6 } catch (error) {7 throw error;8 }9};10 11export const verifyPasswordRecoveryCode = async (email, code) => {12 try {13 return await axiosClient.post("/forgot-password/verify", {14 email,15 code,16 });17 } catch (error) {18 throw error;19 }20};21 22export const resetPasswordWithRecoveryCode = async (email, code, newPassword) => {23 try {24 return await axiosClient.post("/forgot-password/reset", {25 email,26 code,27 newPassword,28 });29 } catch (error) {30 throw error;31 }32};33 