From 8e35b48a6cad79c9825ebfaaafe4bc1a67aed157 Mon Sep 17 00:00:00 2001 From: kim <83156897+kyoungbinkim@users.noreply.github.com> Date: Fri, 20 Jun 2025 13:21:01 +0900 Subject: [PATCH] Refactor: example.js - Changed the `listNamespacedPod` method call to use an object parameter format `{namespace}` for improved readability and consistency. - Updated the response handling to access `res.items` instead of `res.body`. --- examples/example.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/example.js b/examples/example.js index ec747a29fc..88083f441d 100644 --- a/examples/example.js +++ b/examples/example.js @@ -8,9 +8,9 @@ kc.loadFromDefault(); const k8sApi = kc.makeApiClient(k8s.CoreV1Api); const main = async () => { - const res = await k8sApi.listNamespacedPod(namespace); + const res = await k8sApi.listNamespacedPod({namespace}); - console.log(`${namespace} namespace pods: `, res.body); + console.log(`${namespace} namespace pods: `, res.items); }; main();