mirror of
https://github.com/lemeow125/Ivy-Frontend.git
synced 2025-05-12 09:31:07 +08:00
Fixed dashboard loading and error pages not showing properly and made lowest stock widget functional
This commit is contained in:
parent
d518abec77
commit
fd7891359c
2 changed files with 30 additions and 7 deletions
|
@ -57,6 +57,19 @@ export function UpdateProduct(product: UpdateProductParams) {
|
|||
});
|
||||
}
|
||||
|
||||
export function GetLowestStockedProduct() {
|
||||
const token = JSON.parse(localStorage.getItem("token") || "{}");
|
||||
return axios
|
||||
.get("http://localhost:8000/api/v1/lowest_stock_product/", {
|
||||
headers: {
|
||||
Authorization: "Token " + token,
|
||||
},
|
||||
})
|
||||
.then((response) => {
|
||||
return response.data;
|
||||
});
|
||||
}
|
||||
|
||||
export function GetLogs() {
|
||||
const token = JSON.parse(localStorage.getItem("token") || "{}");
|
||||
return axios
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue