usar nombre con más sentido para nuevo inquilino

Es difícil suponer lo que simboliza con un nombre genérico como "data"
This commit is contained in:
Eduardo Quiros 2022-08-03 22:19:26 -06:00
parent d6ea59679f
commit a2c386bd10
No known key found for this signature in database
GPG Key ID: B77F36C3F12720B4
1 changed files with 2 additions and 2 deletions

View File

@ -99,7 +99,7 @@ const Inquilinos = () => {
})) }))
function registrarInquilino() { function registrarInquilino() {
let data = { let newTenant = {
_id: null, _id: null,
dni: '', dni: '',
name: '', name: '',
@ -119,7 +119,7 @@ const Inquilinos = () => {
fetch('http://localhost:3000/api/createUser', { fetch('http://localhost:3000/api/createUser', {
method: 'POST', method: 'POST',
cache: 'no-cache', cache: 'no-cache',
body: JSON.stringify(data), body: JSON.stringify(newTenant),
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
}, },