19 lines
469 B
TypeScript
19 lines
469 B
TypeScript
import axios from "axios";
|
|
import { envConfig } from "./config";
|
|
|
|
export async function getEquipoByCount(idCuenta: number) {
|
|
try {
|
|
const res = await axios.get(
|
|
`${envConfig.apiUrl}/bitacora/cuenta/${idCuenta}`,
|
|
);
|
|
return res.data;
|
|
} catch (error: any) {
|
|
if (axios.isAxiosError(error)) {
|
|
return {
|
|
error: error.response?.data?.message || "Error al consultar equipo",
|
|
};
|
|
}
|
|
|
|
return { error: "Error desconocido" };
|
|
}
|
|
} |