Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Egghead Tutorial: Updating stripe_customer not working with hook. #7

Open
stoplion opened this issue May 14, 2022 · 1 comment
Open

Comments

@stoplion
Copy link

Hi, I'm doing the Egghead tutorial. This lesson add hook function to add stripe_customer to Profile.

When I remove row level security in Profile table, stripe_customer updates. But with it on, it doesn't. I added the 'read' row level security from prior lesson. Has something changed?

With row level security on

const status = await supabase
    .from('profile')
    .update({
      stripe_customer: stripeCustomer.id
    })
    .eq('id', req.body.record.id);

status is

status: 404
statusText: "Not Found"

When I turn off security it's status 200.

@stoplion stoplion changed the title Updating stripe_customer not working with hook. Egghead Tutorial: Updating stripe_customer not working with hook. May 14, 2022
@callmejumeh
Copy link

Try to use your Service Role Key to bypass RLS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants