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

@ -79,7 +79,7 @@ Editar Propietario
const original_id = $("[name='comuna']").val()
const uri = '{{$urls->api}}/direcciones/comunas/find'
const data = {direccion}
return fetch(uri,
return fetchAPI(uri,
{method: 'post', headers: {'Content-Type': 'application/json'}, body: JSON.stringify(data)}
).then(response => {
if (response.ok) {
@ -101,7 +101,7 @@ Editar Propietario
const parent = $('#comunas')
parent.hide()
const uri = '{{$urls->api}}/direcciones/region/' + region_id + '/comunas'
return fetch(uri).then(response => {
return fetchAPI(uri).then(response => {
if (response.ok) {
return response.json()
}
@ -195,7 +195,7 @@ Editar Propietario
redirect()
return
}
return fetch(uri,
return fetchAPI(uri,
{method: 'put', headers: {'Content-Type': 'application/json'}, body: JSON.stringify(data)}
).then(response => {
if (response.ok) {