import { ApiVoidResult } from "@core/Models/Api.VoidResult.type";
import ApiRequest from "@services/Api.Service";

export type ErrorReportParams = {
    message: string;
    url: string;
    userName: string;
    userEmail: string;
    userId: string;
    dateError: Date;
};

export const reportError = async (data: ErrorReportParams): Promise<ApiVoidResult> => {
    return ApiRequest.post<ApiVoidResult>("error-reporting/report", data);
};
