added request to api
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import apiClient from "./apiClient";
|
||||
|
||||
export async function PostReceipt(data: any) {
|
||||
try {
|
||||
const response = await apiClient.post("/recibo", 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 };
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user