Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 2452

Is it normal to create two unrelated (different) resources in one request? [closed]

$
0
0

When a user offers friendship to another user, he automatically subscribes to him. How to implement this in REST API?Two different entities (aggregates) are created in one request: Friendship (with OFFERED status) and Subscription, but the endpoint is called /friendships. Is it normal that there is such a side effect as a subscription? Or should I implement it differently?Are there recommendations for such situations?

I want the logic to remain the same: automatic subscription occurs when a friendship is offered. Not otherwise.


Viewing all articles
Browse latest Browse all 2452

Trending Articles





<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>