FIX: Remove login for API
This commit is contained in:
@ -105,7 +105,7 @@
|
||||
const cuota_id = button.data('cuota')
|
||||
const calendar = $(".ui.calendar[data-cuota='" + cuota_id + "']").calendar('get date')
|
||||
const fecha = [calendar.getFullYear(), calendar.getMonth()+1, calendar.getDate()].join('-')
|
||||
fetch('{{$urls->api}}/ventas/cuota/abonar', {
|
||||
return fetchAPI('{{$urls->api}}/ventas/cuota/abonar', {
|
||||
method: 'post', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({cuota_id, fecha})
|
||||
}).then(response => {
|
||||
if (response.ok) {
|
||||
@ -125,7 +125,7 @@
|
||||
const cuota_id = button.data('cuota')
|
||||
const calendar = $(".ui.calendar[data-cuota='" + cuota_id + "']").calendar('get date')
|
||||
const fecha = [calendar.getFullYear(), calendar.getMonth()+1, calendar.getDate()].join('-')
|
||||
fetch('{{$urls->api}}/ventas/cuota/devolver', {
|
||||
return fetchAPI('{{$urls->api}}/ventas/cuota/devolver', {
|
||||
method: 'post', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({cuota_id, fecha})
|
||||
}).then(response => {
|
||||
if (response.ok) {
|
||||
|
Reference in New Issue
Block a user