Skip to content

Commit

Permalink
refactoring code
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladik-gif committed Nov 23, 2024
1 parent a217c3e commit 29e2186
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions src/main/java/com/chat/yourway/mapper/BaseMapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.chat.yourway.dto.response.MessageResponseDto;
import com.chat.yourway.dto.response.notification.LastMessageResponseDto;
import com.chat.yourway.model.Contact;
import com.chat.yourway.model.Message;
import com.chat.yourway.model.Topic;
import com.chat.yourway.service.LastMessagesService;
import lombok.RequiredArgsConstructor;
Expand All @@ -14,7 +13,6 @@

import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;

@Named("BaseMapper")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ public void unsubscribeFromTopicById(UUID topicId) {
}

public List<ContactResponseDto> findAllSubscribersByTopicId(UUID id) {
Topic topic = topicService.getTopic(id);
return topic.getTopicSubscribers().stream()
return topicService.getTopic(id).getTopicSubscribers().stream()
.map(contactMapper::toResponseDto)
.toList();
}
Expand Down

0 comments on commit 29e2186

Please sign in to comment.