Исправлены дублирующиеся пакеты

This commit is contained in:
sshkurov
2022-02-04 08:10:24 +03:00
parent cf90c1e758
commit d255584555
2 changed files with 2 additions and 1 deletions

View File

@@ -247,6 +247,7 @@ public class StreamService {
public List<Packet> getPackets(long streamId) {
return repository.getStreamWithPackets(streamId)
.map(Stream::getPackets)
.map(packets -> packets.stream().distinct().collect(Collectors.toList()))
.orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND));
}