We have microservices architecture project with two API:
- External user API - API for users who are registered/logged in our website.
- Internal user API - API for users who are not registered in our website and who makes request from another website (users don't know about our website X, they just making request to site Y and site Y makes request to our site to get data for user).
Format of requests/responses are totally different for both APIs, but processing/logic - totally same.
Question - how to keep two different services (API) but not copy-paste code for processing?
Technologies we use: Python(Flask).