mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
modificado fichero ajax para tener getpromise
This commit is contained in:
@ -59,6 +59,7 @@ class Ajax {
|
|||||||
error: this.error
|
error: this.error
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
getPromise() {
|
getPromise() {
|
||||||
if (this.jqXHR) {
|
if (this.jqXHR) {
|
||||||
this.jqXHR.abort();
|
this.jqXHR.abort();
|
||||||
@ -71,7 +72,7 @@ class Ajax {
|
|||||||
data: this.data,
|
data: this.data,
|
||||||
headers: this.headers,
|
headers: this.headers,
|
||||||
success: (response) => {
|
success: (response) => {
|
||||||
if (this.success) this.success(response);
|
if (this.success) this.success(response);
|
||||||
resolve(response);
|
resolve(response);
|
||||||
},
|
},
|
||||||
error: (xhr) => {
|
error: (xhr) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user