On renvoie les promesses

This commit is contained in:
Ludovic Stephan 2019-12-23 15:16:04 +01:00
parent 49ef8b3c15
commit 0221221d53

View file

@ -206,7 +206,7 @@ function KHistory(options = {}) {
this.fetch = function (fetch_options) { this.fetch = function (fetch_options) {
options = $.extend({}, this.fetch_options, fetch_options); options = $.extend({}, this.fetch_options, fetch_options);
var that = this; var that = this;
$.ajax({ return $.ajax({
dataType: "json", dataType: "json",
url: django_urls["kfet.history.json"](), url: django_urls["kfet.history.json"](),
method: "POST", method: "POST",
@ -223,7 +223,7 @@ function KHistory(options = {}) {
return false return false
window.lock = 1; window.lock = 1;
var that = this; var that = this;
$.ajax({ return $.ajax({
dataType: "json", dataType: "json",
url: django_urls[`kfet.${type}s.cancel`](), url: django_urls[`kfet.${type}s.cancel`](),
method: "POST", method: "POST",