Skip to content

Commit

Permalink
feat: add missing customer.ts playground code
Browse files Browse the repository at this point in the history
  • Loading branch information
Baroshem committed Nov 20, 2024
1 parent 5a9815b commit 5d6f6e9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions playground/server/api/customer.ts
Original file line number Diff line number Diff line change
@@ -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
})

0 comments on commit 5d6f6e9

Please sign in to comment.