From 94b7e5c1944ed5ed8d91dd96fabeaaeaa2843505 Mon Sep 17 00:00:00 2001 From: Branko Conjic Date: Thu, 13 Jun 2024 23:17:51 -0400 Subject: [PATCH] refactor: update example --- examples/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/index.ts b/examples/index.ts index e6385e5..1bd3d64 100644 --- a/examples/index.ts +++ b/examples/index.ts @@ -1,4 +1,4 @@ -import { lemonSqueezySetup, listVariants } from "../src/index.js"; +import { getAuthenticatedUser, lemonSqueezySetup } from "../src/index.js"; const apiKey = import.meta.env.LEMON_SQUEEZY_API_KEY; @@ -9,10 +9,10 @@ lemonSqueezySetup({ }); // Get authenticated user -const { data, error } = await listVariants(); +const { data, error } = await getAuthenticatedUser(); if (error) { - console.log(error.cause); + console.log(error.message); } else { - console.log(JSON.stringify({ data: data.data }, null, 2)); + console.log(data); }