apply DRY to alumno-sancio

This commit is contained in:
2026-02-23 12:09:37 -06:00
parent 8f99440207
commit a0cd2da717
5 changed files with 11 additions and 32 deletions
-19
View File
@@ -1,19 +0,0 @@
import axios from "axios";
import { envConfig } from "./config";
export async function GetSanciones(numAcount: number) {
try {
const response = await axios.get(
`${envConfig.apiUrl}/alumno-sancion/${numAcount}`
);
return response.data;
} catch (error: any) {
const msg =
error.response?.data?.message ||
error.message ||
"Error desconocido al obtener estudiante";
return { error: msg };
}
}
//IO