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()
    });
};
