From a2c386bd104c372b7711b45aa6de2040a0409098 Mon Sep 17 00:00:00 2001 From: Eduardo Quiros Date: Wed, 3 Aug 2022 22:19:26 -0600 Subject: [PATCH] =?UTF-8?q?usar=20nombre=20con=20m=C3=A1s=20sentido=20para?= =?UTF-8?q?=20nuevo=20inquilino?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Es difícil suponer lo que simboliza con un nombre genérico como "data" --- web-ui/web-react/src/components/Inquilinos.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web-ui/web-react/src/components/Inquilinos.js b/web-ui/web-react/src/components/Inquilinos.js index d994c0be..6ea3376f 100644 --- a/web-ui/web-react/src/components/Inquilinos.js +++ b/web-ui/web-react/src/components/Inquilinos.js @@ -99,7 +99,7 @@ const Inquilinos = () => { })) function registrarInquilino() { - let data = { + let newTenant = { _id: null, dni: '', name: '', @@ -119,7 +119,7 @@ const Inquilinos = () => { fetch('http://localhost:3000/api/createUser', { method: 'POST', cache: 'no-cache', - body: JSON.stringify(data), + body: JSON.stringify(newTenant), headers: { 'Content-Type': 'application/json', },