Skip to content

Commit

Permalink
refactor: update example
Browse files Browse the repository at this point in the history
  • Loading branch information
brankoconjic committed Jun 14, 2024
1 parent 94ebe0a commit 94b7e5c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/index.ts
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -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);
}

0 comments on commit 94b7e5c

Please sign in to comment.