[Fix] load produk
This commit is contained in:
parent
4f880d44e4
commit
1cd2aa60d4
@ -202,11 +202,12 @@ const loadKategori = async () => {
|
|||||||
|
|
||||||
const loadProduk = async () => {
|
const loadProduk = async () => {
|
||||||
try {
|
try {
|
||||||
await axios.delete(`/api/produk/${detail.value.id}`, {
|
const response = await axios.get(`/api/produk`, {
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${localStorage.getItem("token")}`,
|
Authorization: `Bearer ${localStorage.getItem("token")}`,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (response.data && Array.isArray(response.data)) {
|
if (response.data && Array.isArray(response.data)) {
|
||||||
products.value = response.data;
|
products.value = response.data;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user