Endpoint
Authentication
Required. User must be authenticated to like a post.Path Parameters
The unique identifier of the post to like (PostID)
Request Body
The username of the authenticated user liking the post
Behavior
- Creates a PostLike record with composite key (LikerID, PostID)
- Increments the post’s LikeCount
- Creates a notification for the post owner
- Prevents liking posts from blocked accounts
Request
Response
201 Created - Post liked successfully
Errors
Post does not exist or action cannot be completed due to a block
The user already liked the post