sadmann7 / skateshop

An open source e-commerce skateshop build with everything new in Next.js.
https://skateshop.sadmn.com
MIT License
5.3k stars 761 forks source link

Fixing cart actions #136

Open JDLanctot opened 6 months ago

JDLanctot commented 6 months ago

One spot is hard coded to have the dbPrefix as skateshop in cart.ts actions because using the dbPrefix was causing an error.

vercel[bot] commented 6 months ago

Someone is attempting to deploy a commit to the sadmann7 Team on Vercel.

A member of the Team first needs to authorize it.

sadmann7 commented 6 months ago

thanks for the pr.

can you show what does the error message say?

i updated drizzle just now, maybe this will fix it

JDLanctot commented 6 months ago

I'll check if drizzle update fixes it before getting back to you.

JDLanctot commented 4 months ago

Just made it so that types are cast in sql when working with cart.items, updated cart.items to be json[], and then updated the getUniqueStoreIds() server action to use sql to unnest the the json[] and get the corresponding products to determine the distinct store ids.