23 lines
473 B
TypeScript
23 lines
473 B
TypeScript
import routes from "@/routes";
|
|
import { getBaseHeaders } from "../utils";
|
|
|
|
export interface Payload {
|
|
email: string;
|
|
}
|
|
|
|
export type Response = {
|
|
status: string;
|
|
message: string;
|
|
password?: string;
|
|
}
|
|
|
|
export const resetRequest = (data: Payload) => {
|
|
const url = new URL(routes.server.resetPassword());
|
|
const body = JSON.stringify(data);
|
|
return new Request(url, {
|
|
method: "POST",
|
|
body,
|
|
headers: getBaseHeaders()
|
|
});
|
|
};
|