diff --git a/config/clients/js/template/example/example1/example1.mjs b/config/clients/js/template/example/example1/example1.mjs index 521040e9..dae177fc 100644 --- a/config/clients/js/template/example/example1/example1.mjs +++ b/config/clients/js/template/example/example1/example1.mjs @@ -188,7 +188,7 @@ async function main () { // execute a batch check const anneCorrelationId = randomUUID(); - const { responses } = await fgaClient.batchCheck({ + const { result } = await fgaClient.batchCheck({ checks: [ { // should have access @@ -209,7 +209,7 @@ async function main () { ] }); - const anneAllowed = responses.filter(r => r.correlationId === anneCorrelationId); + const anneAllowed = result.filter(r => r.correlationId === anneCorrelationId); console.log(`Anne is allowed access to ${anneAllowed.length} documents`); anneAllowed.forEach(item => { console.log(`Anne is allowed access to ${item.request.object}`); diff --git a/config/clients/js/template/example/opentelemetry/opentelemetry.mjs b/config/clients/js/template/example/opentelemetry/opentelemetry.mjs index 2414f154..c29fbe47 100644 --- a/config/clients/js/template/example/opentelemetry/opentelemetry.mjs +++ b/config/clients/js/template/example/opentelemetry/opentelemetry.mjs @@ -101,7 +101,7 @@ async function main () { } console.log("Calling BatcCheck") - const { responses } = await fgaClient.batchCheck({ + await fgaClient.batchCheck({ checks: [ { object: "doc:roadmap",