FIX: Remove login for API

This commit is contained in:
2023-11-25 00:55:31 -03:00
parent 3cadaca746
commit ec7d8e69ab
34 changed files with 140 additions and 71 deletions

View File

@ -13,7 +13,7 @@
proyectos: () => {
this.draw().loading()
const url = '{{$urls->api}}/proyectos/escriturando'
return fetch(url).then(response => {
return fetchAPI(url).then(response => {
if (response.ok) {
return response.json()
}
@ -38,7 +38,7 @@
},
unidades: proyecto_id => {
const url = '{{$urls->api}}/ventas/unidades/disponibles'
return fetch(url, {method: 'post', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({proyecto_id})}).then(response => {
return fetchAPI(url, {method: 'post', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({proyecto_id})}).then(response => {
if (response.ok) {
return response.json()
}
@ -49,7 +49,7 @@
},
promesas: proyecto_id => {
const url = '{{$urls->api}}/ventas/estados/firmar'
return fetch(url, {method: 'post', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({proyecto_id})}).then(response => {
return fetchAPI(url, {method: 'post', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({proyecto_id})}).then(response => {
if (response.ok) {
return response.json()
}
@ -60,7 +60,7 @@
},
escrituras: proyecto_id => {
const url = '{{$urls->api}}/ventas/escrituras/estados';
return fetch(url, {method: 'post', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({proyecto_id})}).then(response => {
return fetchAPI(url, {method: 'post', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({proyecto_id})}).then(response => {
if (response.ok) {
return response.json()
}