Files
front-AT/app/lib/postImpressions.ts
T

21 lines
463 B
TypeScript
Raw Normal View History

2025-09-24 14:05:51 -06:00
import apiClient from "./apiClient";
2025-09-19 17:20:05 -06:00
export async function PostImpressions(data: any) {
try {
2025-09-19 18:54:47 -06:00
const response = await apiClient.post("/operations/impressions", data);
2025-09-19 17:20:05 -06:00
return response.data;
} catch (error: any) {
const msg =
2026-01-28 17:04:29 -06:00
error.response?.data?.message ||
2025-09-19 17:20:05 -06:00
error.message ||
"Error desconocido al cobrar impresión";
2026-01-28 17:04:29 -06:00
return {
error: true,
message: msg,
statusCode: error.response?.status,
};
2025-09-19 17:20:05 -06:00
}
}
2025-09-22 14:53:19 -06:00
//IO