diff --git a/playground/server/api/customer.ts b/playground/server/api/customer.ts new file mode 100644 index 0000000..d6f5b9f --- /dev/null +++ b/playground/server/api/customer.ts @@ -0,0 +1,11 @@ +import { serverMedusaClient } from '#medusa/server' + +export default eventHandler(async (event) => { + const client = serverMedusaClient(event) + + const { customer } = await client.store.customer.retrieve({}, { + Cookie: event.node.req.headers.cookie, + }); + + return customer +}) \ No newline at end of file