Skip to content

Commit

Permalink
Refactor fetching and updating user data
Browse files Browse the repository at this point in the history
  • Loading branch information
yoelmarain committed Sep 27, 2024
1 parent 27459e8 commit b73387c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions FrontAdmin/src/API-Alumnos/Compromiso.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const FetchCompromisos = async () => {
try {

Check warning on line 5 in FrontAdmin/src/API-Alumnos/Compromiso.ts

View workflow job for this annotation

GitHub Actions / Linter de Código

Insert `·`
const token = Cookies.get('tokennn');
const dni = Cookies.get('dni');
// const dni = 42790229;

Check warning on line 8 in FrontAdmin/src/API-Alumnos/Compromiso.ts

View workflow job for this annotation

GitHub Actions / Linter de Código

Delete `···`
const response = await fetch(`http://localhost:8000/api/firmas/firmas-de-alumno/${dni}/`, {

Check warning on line 9 in FrontAdmin/src/API-Alumnos/Compromiso.ts

View workflow job for this annotation

GitHub Actions / Linter de Código

Replace ``http://localhost:8000/api/firmas/firmas-de-alumno/${dni}/`,·{` with `⏎······`http://localhost:8000/api/firmas/firmas-de-alumno/${dni}/`,`
method: 'GET',

Check warning on line 10 in FrontAdmin/src/API-Alumnos/Compromiso.ts

View workflow job for this annotation

GitHub Actions / Linter de Código

Insert `··{⏎`
headers: {

Check warning on line 11 in FrontAdmin/src/API-Alumnos/Compromiso.ts

View workflow job for this annotation

GitHub Actions / Linter de Código

Replace `············` with `········`
Expand Down Expand Up @@ -49,7 +49,7 @@ export const FirmarCompromiso = async () => {
try {
const token = Cookies.get('tokennn');
const dni = Cookies.get('dni')
// const dni = 42790229;

const response = await fetch(`http://localhost:8000/api/firmas/firmar-compromiso/${dni}/`, {
method: 'POST',
headers: {
Expand Down
2 changes: 0 additions & 2 deletions FrontAdmin/src/API-Alumnos/Pagos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export const FetchPostPago = async (
try {
const token = Cookies.get('tokennn');
const dni = Cookies.get('dni');
// const dni = 36562786; // Puedes obtener esto desde las cookies también

// Crea un nuevo objeto FormData
const formData = new FormData();
Expand Down Expand Up @@ -53,7 +52,6 @@ export const FetchGetCuotas = async () => {
try {
const token = Cookies.get('tokennn');
const dni = Cookies.get('dni');
// const dni = 36562786;

const response = await fetch(`http://localhost:8000/api/cuotas/alumno/${dni}/?limit=6&offset=0/`, {
method: 'GET',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ interface Cuota {
monto1erVencimiento: number;
monto2doVencimiento: number;
monto3erVencimiento: number;
montoActual: number;
valortotal: number;
valorpagado: number;
valorinformado: number;
valoradeudado: number;
estado: string;
}
Expand Down

0 comments on commit b73387c

Please sign in to comment.