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
...@@ -91,6 +91,10 @@ public class ContentServiceImpl extends DefaultEntityServiceImpl<Content> implem ...@@ -91,6 +91,10 @@ public class ContentServiceImpl extends DefaultEntityServiceImpl<Content> implem
} }
//content.setSessionKeyword(roomRepository.getSessionFromId(content.getRoomId()).getKeyword()); //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; return content;
} catch (final DocumentNotFoundException e) { } catch (final DocumentNotFoundException e) {
logger.error("Could not get content {}.", id, 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