Skip to content
Snippets Groups Projects
Commit f67ca4ee authored by Andreas Parschalk's avatar Andreas Parschalk
Browse files

openolat#72: restapi: new endpoint PUT...

openolat#72: restapi: new endpoint PUT /groups/{groupkey}/configuration/tools/calendar enables calendar tool for group
parent 59bc8dbc
No related branches found
No related tags found
No related merge requests found
......@@ -380,6 +380,19 @@ public class LearningGroupWebService {
}
}
@PUT
@Path("{groupKey}/configuration/tools/calendar")
public Response putGroupCalendar(@PathParam("groupKey") Long groupKey, @Context HttpServletRequest request) {
final BusinessGroupService bgs = CoreSpringFactory.getImpl(BusinessGroupService.class);
BusinessGroup bg = bgs.loadBusinessGroup(groupKey);
if(bg == null) {
return Response.serverError().status(Status.NOT_FOUND).build();
}
CollaborationTools tools = CollaborationToolsFactory.getInstance().getOrCreateCollaborationTools(bg);
tools.setToolEnabled(CollaborationTools.TOOL_CALENDAR, true);
return Response.ok().build();
}
@POST
@Path("{groupKey}/configuration")
public Response postGroupConfiguration(@PathParam("groupKey") Long groupKey, final GroupConfigurationVO group, @Context HttpServletRequest request) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment