[Fix] load produk

This commit is contained in:
Baghaztra 2025-09-09 09:59:29 +07:00
parent 4f880d44e4
commit 1cd2aa60d4

View File

@ -202,11 +202,12 @@ const loadKategori = async () => {
const loadProduk = async () => {
try {
await axios.delete(`/api/produk/${detail.value.id}`, {
const response = await axios.get(`/api/produk`, {
headers: {
Authorization: `Bearer ${localStorage.getItem("token")}`,
},
});
if (response.data && Array.isArray(response.data)) {
products.value = response.data;
}