Skip to content
Snippets Groups Projects

Include ContentGroups when retrieving Contents from service

Merged Daniel Gerhardt requested to merge content-include-groups into master
Viewing commit be571bb7
Show latest version
1 file
+ 4
0
Compare changes
  • Side-by-side
  • Inline
@@ -91,6 +91,10 @@ public class ContentServiceImpl extends DefaultEntityServiceImpl<Content> implem
}
//content.setSessionKeyword(roomRepository.getSessionFromId(content.getRoomId()).getKeyword());
Room room = roomRepository.findOne(content.getRoomId());
content.setGroups(room.getContentGroups().stream()
.map(Room.ContentGroup::getName).collect(Collectors.toSet()));
return content;
} catch (final DocumentNotFoundException e) {
logger.error("Could not get content {}.", id, e);