FIX: Remove login for API
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user