FIX: Remove login for API
This commit is contained in:
@ -339,7 +339,7 @@
|
||||
|
||||
$(this.ids.buttons.add).hide()
|
||||
|
||||
return fetch('{{$urls->api}}/proyectos').then(response => {
|
||||
return fetchAPI('{{$urls->api}}/proyectos').then(response => {
|
||||
if (response.ok) {
|
||||
return response.json()
|
||||
}
|
||||
@ -357,7 +357,7 @@
|
||||
},
|
||||
precios: proyecto_id => {
|
||||
this.data.precios = []
|
||||
return fetch('{{$urls->api}}/ventas/precios',
|
||||
return fetchAPI('{{$urls->api}}/ventas/precios',
|
||||
{method: 'post', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({proyecto_id})}
|
||||
).then(response => {
|
||||
$('.item.proyecto').css('cursor', 'default')
|
||||
@ -639,7 +639,7 @@
|
||||
fecha: $(this.ids.fields.calendar).calendar('get date'),
|
||||
valor: $(this.ids.fields.valor).val()
|
||||
}
|
||||
return fetch('{{$urls->api}}/precios/update',
|
||||
return fetchAPI('{{$urls->api}}/precios/update',
|
||||
{method: 'post', headers: {'Content-Type': 'application/json'}, body: JSON.stringify(data)}
|
||||
).then(response => {
|
||||
if (response.ok) {
|
||||
|
Reference in New Issue
Block a user