Skip to content
Snippets Groups Projects
Commit 6987618d authored by Daniel Gerhardt's avatar Daniel Gerhardt
Browse files

Merge branch 'content-include-groups' into 'master'

Include ContentGroups when retrieving Contents from service

Closes #30 and #29

See merge request !106
parents 789c5918 be571bb7
1 merge request!106Include ContentGroups when retrieving Contents from service
Pipeline #20828 passed with warnings with stages
in 1 minute and 51 seconds
......@@ -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);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment