Files
front-AT/app/lib/postReceipt.ts
T
2025-09-19 18:54:47 -06:00

16 lines
402 B
TypeScript

import apiClient from "./apiClient";
export async function PostReceipt(data: any) {
try {
const response = await apiClient.post("/operations/receipt", data);
console.log(response.data);
return response.data;
} catch (error: any) {
const msg =
error.response?.data?.message ||
error.message ||
"Error desconocido al crear recibo";
return { error: msg };
}
}