21 lines
463 B
TypeScript
21 lines
463 B
TypeScript
import apiClient from "./apiClient";
|
|
|
|
export async function PostImpressions(data: any) {
|
|
try {
|
|
const response = await apiClient.post("/operations/impressions", data);
|
|
return response.data;
|
|
} catch (error: any) {
|
|
const msg =
|
|
error.response?.data?.message ||
|
|
error.message ||
|
|
"Error desconocido al cobrar impresión";
|
|
|
|
return {
|
|
error: true,
|
|
message: msg,
|
|
statusCode: error.response?.status,
|
|
};
|
|
}
|
|
}
|
|
//IO
|