mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +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…
Reference in New Issue
Block a user