mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 20:46:47 +00:00
add inventreeDelete ajax function
This commit is contained in:
parent
36ac268b96
commit
7a7db97914
@ -108,6 +108,25 @@ function inventreePut(url, data={}, options={}) {
|
||||
if (options.error) {
|
||||
options.error(xhr, ajaxOptions, thrownError);
|
||||
}
|
||||
},
|
||||
complete: function(xhr, status) {
|
||||
if (options.complete) {
|
||||
options.complete(xhr, status);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function inventreeDelete(url, options={}) {
|
||||
/*
|
||||
* Delete a record
|
||||
*/
|
||||
|
||||
options = options || {};
|
||||
|
||||
options.method = 'DELETE';
|
||||
|
||||
inventreePut(url, {}, options);
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user