Suppose I have a server with the following two jobs:
- Handle a payment using Stripe
- Connect to a DB with a list of posts/products/items
What would be the best approach:
Have all the calls go to /api/ eg. /api/payment and /api/posts
Or since the payment is not as extensive and is a smaller function have it separate:
/payment and the posts goes to /api/posts and you can GET, POST on that
Just trying to understand the best practices, please let me know if I'm way off base.