0 points

Promise resolution where function is returned outside (jquery)


dashboard

Fri Nov 20 2020 06:20:59 GMT+0000 (UTC)

Posted by @eneki

function refreshPendingIncidents() {
  return $.ajax({
    type: 'GET',
    url: '/pending-incidents/refresh/' + "{{ $reports[0]->id }}"
  });
}

refreshPendingIncidents().done(function(result) {
  console.log(result)
  console.log('res')
  }).fail(function() {
  	console.log('fail')
});
content_copy Copy