added more headers

This commit is contained in:
2026-02-27 19:52:23 -06:00
parent 805f4835a3
commit 46357ee7e0
7 changed files with 37 additions and 17 deletions
+5 -1
View File
@@ -1,10 +1,14 @@
import axios from "axios";
import { envConfig } from "./config";
import Cookies from "js-cookie";
export async function GetSancionByStudent(numAcount: number) {
try {
const token = Cookies.get("token");
const headers = { Authorization: `Bearer ${token}` };
const response = await axios.get(
`${envConfig.apiUrl}/alumno-sancion/${numAcount}`
`${envConfig.apiUrl}/alumno-sancion/${numAcount}`, { headers }
);
return response.data;