-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of https://github.com/Seminario-Integrador-2024/Ge…
…stionTUP into dev
- Loading branch information
Showing
36 changed files
with
976 additions
and
329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
import Cookies from 'js-cookie'; | ||
|
||
|
||
export const actualizarpagos = async () => { | ||
const token = Cookies.get('tokennn'); | ||
const response = await fetch('http://localhost:8000/api/pagos/actualizar-pagos', { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
'Authorization': `Bearer ${token}` | ||
} | ||
}); | ||
if (response.ok) { | ||
const data = await response.json(); | ||
return data; | ||
} else { | ||
const errorData = await response.json(); | ||
throw new Error( | ||
`Error en la respuesta del servidor: ${errorData.message}` | ||
); | ||
} | ||
}; | ||
|
||
export const actualizarinhabilitaciones = async () => { | ||
const token = Cookies.get('tokennn'); | ||
const response = await fetch('http://localhost:8000/api/alumnos/actualizar-inhabiliciones', { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
'Authorization': `Bearer ${token}` | ||
} | ||
}); | ||
if (response.ok) { | ||
const data = await response.json(); | ||
return data; | ||
} else { | ||
const errorData = await response.json(); | ||
throw new Error( | ||
`Error en la respuesta del servidor: ${errorData.message}` | ||
); | ||
} | ||
}; | ||
|
||
export const actualizarmaterias = async () => { | ||
const token = Cookies.get('tokennn'); | ||
const response = await fetch('http://localhost:8000/api/materias/actualizar-materias', { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
'Authorization': `Bearer ${token}` | ||
} | ||
}); | ||
if (response.ok) { | ||
const data = await response.json(); | ||
return data; | ||
} else { | ||
const errorData = await response.json(); | ||
throw new Error( | ||
`Error en la respuesta del servidor: ${errorData.message}` | ||
); | ||
} | ||
}; | ||
|
||
export const actualizarcuotas = async () => { | ||
const token = Cookies.get('tokennn'); | ||
const response = await fetch('http://localhost:8000/api/cuotas/actualizar-cuotas', { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
'Authorization': `Bearer ${token}` | ||
} | ||
}); | ||
if (response.ok) { | ||
const data = await response.json(); | ||
return data; | ||
} else { | ||
const errorData = await response.json(); | ||
throw new Error( | ||
`Error en la respuesta del servidor: ${errorData.message}` | ||
); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.