Spring Rest Api Design For Following a User in Twitter Clone Appliction?
Clash Royale CLAN TAG #URR8PPP Spring Rest Api Design For Following a User in Twitter Clone Appliction? i Want to Design a Demo Twitter Clone Application where user can follow any other user . however i am doubting my rest api design . please suggest me am i right . can we pass followerId in url rather than passing it as requestbody ? and if better option could be there like put/patch or any rest api design ? Here JwtUser is Authenticated User public class FollowerDto { @NotBlank private Long followerId; private boolean following; public FollowerDto() { } public FollowerDto(Long followerId, boolean following) { this.followerId = followerId; this.following = following; } public boolean getFollowing() { return following; } public void setFollowing(boolean following) { this.following = following; } public Long getFollowerId() { return followerId; } public void setFollowerId(Long followerId) { this.followerId = followerId; } } @PostMapping("/follower"...