- fix issue where getMeetings and getRecordings calls just loops back resulting in StakOverflow
This commit is contained in:
parent
1a9857d493
commit
090cb4115b
@ -41,6 +41,14 @@ class UrlMappings {
|
|||||||
action = [POST:'setPollXML']
|
action = [POST:'setPollXML']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"/api/getMeetings"(controller:"api") {
|
||||||
|
action = [GET:'getMeetingsHandler']
|
||||||
|
}
|
||||||
|
|
||||||
|
"/api/getRecordings"(controller:"api") {
|
||||||
|
action = [GET:'getRecordingsHandler']
|
||||||
|
}
|
||||||
|
|
||||||
"/$controller/$action?/$id?(.${format})?"{
|
"/$controller/$action?/$id?(.${format})?"{
|
||||||
constraints {
|
constraints {
|
||||||
// apply constraints here
|
// apply constraints here
|
||||||
|
@ -678,10 +678,12 @@ class ApiController {
|
|||||||
/************************************
|
/************************************
|
||||||
* GETMEETINGS API
|
* GETMEETINGS API
|
||||||
************************************/
|
************************************/
|
||||||
def getMeetings = {
|
def getMeetingsHandler = {
|
||||||
String API_CALL = "getMeetings"
|
String API_CALL = "getMeetings"
|
||||||
log.debug CONTROLLER_NAME + "#${API_CALL}"
|
log.debug CONTROLLER_NAME + "#${API_CALL}"
|
||||||
|
|
||||||
|
println("##### GETMEETINGS API CALL ####")
|
||||||
|
|
||||||
// BEGIN - backward compatibility
|
// BEGIN - backward compatibility
|
||||||
if (StringUtils.isEmpty(params.checksum)) {
|
if (StringUtils.isEmpty(params.checksum)) {
|
||||||
invalid("checksumError", "You did not pass the checksum security check")
|
invalid("checksumError", "You did not pass the checksum security check")
|
||||||
@ -708,7 +710,7 @@ class ApiController {
|
|||||||
|
|
||||||
// Do we agree on the checksum? If not, complain.
|
// Do we agree on the checksum? If not, complain.
|
||||||
if (! paramsProcessorUtil.isChecksumSame(API_CALL, params.checksum, request.getQueryString())) {
|
if (! paramsProcessorUtil.isChecksumSame(API_CALL, params.checksum, request.getQueryString())) {
|
||||||
errors.checksumError()
|
errors.checksumError()
|
||||||
respondWithErrors(errors)
|
respondWithErrors(errors)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -722,37 +724,37 @@ class ApiController {
|
|||||||
render(contentType:"text/xml") {
|
render(contentType:"text/xml") {
|
||||||
response() {
|
response() {
|
||||||
returncode(RESP_CODE_SUCCESS)
|
returncode(RESP_CODE_SUCCESS)
|
||||||
meetings(null)
|
meetings()
|
||||||
messageKey("noMeetings")
|
messageKey("noMeetings")
|
||||||
message("no meetings were found on this server")
|
message("no meetings were found on this server")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
} else {
|
||||||
}
|
println("#### Has running meetings [" + mtgs.size() + "] #####")
|
||||||
|
response.addHeader("Cache-Control", "no-cache")
|
||||||
response.addHeader("Cache-Control", "no-cache")
|
withFormat {
|
||||||
withFormat {
|
xml {
|
||||||
xml {
|
render(contentType:"text/xml") {
|
||||||
render(contentType:"text/xml") {
|
response() {
|
||||||
response() {
|
returncode(RESP_CODE_SUCCESS)
|
||||||
returncode(RESP_CODE_SUCCESS)
|
meetings {
|
||||||
meetings() {
|
for (m in mtgs) {
|
||||||
mtgs.each { m ->
|
meeting {
|
||||||
meeting() {
|
meetingID(m.getExternalId())
|
||||||
meetingID(m.getExternalId())
|
meetingName(m.getName())
|
||||||
meetingName(m.getName())
|
createTime(m.getCreateTime())
|
||||||
createTime(m.getCreateTime())
|
attendeePW(m.getViewerPassword())
|
||||||
attendeePW(m.getViewerPassword())
|
moderatorPW(m.getModeratorPassword())
|
||||||
moderatorPW(m.getModeratorPassword())
|
hasBeenForciblyEnded(m.isForciblyEnded() ? "true" : "false")
|
||||||
hasBeenForciblyEnded(m.isForciblyEnded() ? "true" : "false")
|
running(m.isRunning() ? "true" : "false")
|
||||||
running(m.isRunning() ? "true" : "false")
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1415,7 +1417,7 @@ class ApiController {
|
|||||||
/******************************************************
|
/******************************************************
|
||||||
* GET_RECORDINGS API
|
* GET_RECORDINGS API
|
||||||
******************************************************/
|
******************************************************/
|
||||||
def getRecordings = {
|
def getRecordingsHandler = {
|
||||||
String API_CALL = "getRecordings"
|
String API_CALL = "getRecordings"
|
||||||
log.debug CONTROLLER_NAME + "#${API_CALL}"
|
log.debug CONTROLLER_NAME + "#${API_CALL}"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user