Interface ReactionService
- All Known Implementing Classes:
ReactionServiceImpl
public interface ReactionService
Service for reaction-related business operations.
-
Method Summary
Modifier and TypeMethodDescriptionsetReaction(Long postId, Long userId, ReactionType reactionType) Sets or updates a user's reaction on a post.
-
Method Details
-
setReaction
Sets or updates a user's reaction on a post. If the user has already reacted, updates the reaction type. If the user hasn't reacted yet, creates a new reaction.- Parameters:
postId- the ID of the post to react touserId- the ID of the user making the reactionreactionType- the type of reaction (LIKE or DISLIKE)- Returns:
- the created or updated reaction as DTO
-