commerce
commerce copied to clipboard
Automate the API routes created by commerce
trafficstars
Right now every single endpoint under pages/api has the same code but points to a different file, we should be able to remove those files from the repo and create them automatically if the provider requires them and remove them if not.
We would wanna move them to a /api/commerce folder first to make sure we don't mix with other API routes.
Note that we could also do something like pages/api/commerce/[...routes].ts but if we scale that can become troublesome.