2
0
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:
Oliver
2021-06-23 20:30:26 +10:00
parent 058e53459b
commit eaa5913c8c
3 changed files with 72 additions and 4 deletions

View File

@ -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);
}
});
}