Merge branch 'master' of https://github.com/openclassify/openclassify into muammertop

This commit is contained in:
Muammer Top 2021-07-08 15:39:48 +03:00
commit 83f2a37223
2 changed files with 22 additions and 16 deletions

View File

@ -1,11 +1,14 @@
function crudAjax(params, url, type, callback = () => {}, async = false) {
function crudAjax(params, url, type = 'GET', callback = () => {}, async = true, options = {}) {
return $.ajax({
type: type,
data: params,
async: async,
url: url,
success: function (response) {
callback(response);
...{
type: type,
data: params,
async: async,
url: url,
success: function (response) {
callback(response);
},
},
...options
});
}
}

View File

@ -1,11 +1,14 @@
function crudAjax(params, url, type, callback, async = false) {
function crudAjax(params, url, type = 'GET', callback = () => {}, async = true, options = {}) {
return $.ajax({
type: type,
data: params,
async: async,
url: url,
success: function (response) {
callback(response);
...{
type: type,
data: params,
async: async,
url: url,
success: function (response) {
callback(response);
},
},
...options
});
}
}