query($sql); $assets = $stmt->fetchAll(); echo json_encode($assets); } catch (Exception $e) { http_response_code(500); echo json_encode(['error' => 'Gagal mengambil data aset: ' . $e->getMessage()]); } ?>