mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Further API calls
- getStock - getStockLocation - getCompanies
This commit is contained in:
parent
7e4b0630b6
commit
ee347c6165
@ -11,7 +11,7 @@ function inventreeGet(url, filters={}) {
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
console.error('Error on GET at ' + url);
|
||||
console.error(thrownError);
|
||||
return {};
|
||||
return {error: thrownError};
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -25,3 +25,15 @@ function getParts(filters={}) {
|
||||
function getPartCategories(filters={}) {
|
||||
return inventreeGet('/api/part/category/', filters);
|
||||
}
|
||||
|
||||
function getStock(filters={}) {
|
||||
return inventreeGet('/api/stock/', filters);
|
||||
}
|
||||
|
||||
function getStockLocations(filters={}) {
|
||||
return inventreeGet('/api/stock/location/', filters)
|
||||
}
|
||||
|
||||
function getCompanies(filters={}) {
|
||||
return inventreeGet('/api/company/', filters);
|
||||
}
|
Loading…
Reference in New Issue
Block a user