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

Include ContentGroups when retrieving Contents from service

Implements #30.
Fixes #29.
parent 789c5918
1 merge request!106Include ContentGroups when retrieving Contents from service
Pipeline #20827 passed with warnings with stages
in 1 minute and 5 seconds
This commit is part of merge request !106. Comments created here will be created in the context of that merge request.
......@@ -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