INNER CODE UNIT · TypeScript
sendResetPasswordLink
flaviuse/mern-authentication · client/src/api/index.ts:7
const sendResetPasswordLink = (email: string) => http.post("/auth/login/forgot", { email });
const resetPassword = (password: string, token: string) =>
http.post<void>(`/auth/login/reset/${token}`, { password });
const postLogout = () => http.post<void>("/auth/logout");
const postUser = (user: User) => http.post<void>("/user/register", user);
const getConfirmation = (token: string) => http.get<void>(`/auth/confirmation/${token}`);
const resendConfirmation = (email: string) => http.post<void>("/auth/send-confirmation", { email });
const resetRegister = (email: string) => http.post<void>("/user/register/cancel", { email });
const getUser = () => http.get<{ user: User }>("/user");
export {