Skip to content

Commit

Permalink
Fix : Replace req.user.customer_id with req.auth_context.actor_id in …
Browse files Browse the repository at this point in the history
…store/products APIs

- Use auth_context.actor_id to retrieve customer_id instead of req.user.customer_id
- Ensure consistency with AuthenticatedMedusaRequest type
- Resolve issue medusajs#9819
  • Loading branch information
docloulou authored Oct 27, 2024
1 parent 7c629f4 commit bfd5e8f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function setPricingContext() {
if (req.user?.customer_id) {
const customerGroups = await refetchEntities(
"customer_group",
{ customer_id: req.user?.customer_id },
{ customer_id: req.auth_context?.actor_id },
req.scope,
["id"]
)
Expand Down

0 comments on commit bfd5e8f

Please sign in to comment.