openvidu-server: GET config for openvidu.cdr config property

pull/203/head
pabloFuente 2019-01-25 11:11:57 +01:00
parent dfac25d360
commit ff9dec285b
1 changed files with 6 additions and 5 deletions

View File

@ -63,12 +63,18 @@ public class ConfigRestController {
return openviduConfig.getOpenViduRecordingPath();
}
@RequestMapping(value = "/openvidu-cdr", method = RequestMethod.GET)
public Boolean getOpenViduCdrEnabled() {
return openviduConfig.isCdrEnabled();
}
@RequestMapping(method = RequestMethod.GET)
public ResponseEntity<?> getOpenViduConfiguration() {
JsonObject json = new JsonObject();
json.addProperty("openviduServerVersion", openviduConfig.getOpenViduServerVersion());
json.addProperty("openviduPublicurl", openviduConfig.getOpenViduPublicUrl());
json.addProperty("openviduCdr", openviduConfig.isCdrEnabled());
json.addProperty("openviduRecording", openviduConfig.isRecordingModuleEnabled());
json.addProperty("openviduRecordingPublicAccess", openviduConfig.getOpenViduRecordingPublicAccess());
json.addProperty("openviduRecordingPath", openviduConfig.getOpenViduRecordingPath());
@ -79,9 +85,4 @@ public class ConfigRestController {
return new ResponseEntity<>(json.toString(), responseHeaders, HttpStatus.OK);
}
@RequestMapping(value = "/restart", method = RequestMethod.POST)
public void restart() {
// OpenViduServer.restart();
}
}