thanks. So there isn't a way to validate the cart ...
# sql
j
thanks. So there isn't a way to validate the cart with just Supabase? I will need to use something like Netlify to do the validation?
m
The database should be enough for prices
I mean. The database should be enough for tracking prices. But you still need some backend code for the checkout
Like, in your cart for each user, you should only store the product name and id
The price should come from a “product table” that the user does not handle it
j
Yes I know that, but if we have more than 1 product then a subtotal calculation needs to be done. If I do the calculations on the client side and then insert, it wouldn't be the right way to do so?
I would need supabase to allow me to write a function that handles that logic and then I would just call it from the client
m
I think with the new functions you could do this