mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 04:55:44 +00:00
Adds custom DRF metadata handler
- Limit available "actions" data to only what the user is allowed to do
This commit is contained in:
@ -23,7 +23,8 @@
|
||||
*/
|
||||
function getApiEndpointOptions(url, options={}) {
|
||||
|
||||
$.ajax({
|
||||
// Return the ajax request object
|
||||
return $.ajax({
|
||||
url: url,
|
||||
type: 'OPTIONS',
|
||||
contentType: 'application/json',
|
||||
@ -31,8 +32,7 @@ function getApiEndpointOptions(url, options={}) {
|
||||
accepts: {
|
||||
json: 'application/json',
|
||||
},
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user