sadmann7 / skateshop

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

Fixing cart actions #136

Open JDLanctot opened 2 months ago

JDLanctot commented 2 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 2 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 1 month 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 1 month ago

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

JDLanctot commented 2 weeks 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.