commerce icon indicating copy to clipboard operation
commerce copied to clipboard

Automate the API routes created by commerce

Open lfades opened this issue 4 years ago • 0 comments
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.

lfades avatar Jun 15 '21 05:06 lfades