Interface ReactionService

All Known Implementing Classes:
ReactionServiceImpl

public interface ReactionService
Service for reaction-related business operations.
  • Method Summary

    Modifier and Type
    Method
    Description
    setReaction(Long postId, Long userId, ReactionType reactionType)
    Sets or updates a user's reaction on a post.
  • Method Details

    • setReaction

      ReactionDTO setReaction(Long postId, Long userId, ReactionType reactionType)
      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 to
      userId - the ID of the user making the reaction
      reactionType - the type of reaction (LIKE or DISLIKE)
      Returns:
      the created or updated reaction as DTO