initial cleanup
This commit is contained in:
parent
15990d2f55
commit
81627bc616
@ -167,7 +167,6 @@ class ApiController {
|
||||
return
|
||||
}
|
||||
|
||||
String createTime = params.createTime
|
||||
// if (StringUtils.isEmpty(createTime)) {
|
||||
// errors.missingParamError("createTime");
|
||||
// }
|
||||
@ -182,6 +181,23 @@ class ApiController {
|
||||
respondWithErrors(errors)
|
||||
return;
|
||||
}
|
||||
|
||||
// the createTime mismatch with meeting's createTime, complain
|
||||
// In the future, the createTime param will be required
|
||||
if(params.createTime!=null){
|
||||
long createTime = 0;
|
||||
try{
|
||||
createTime=Long.parseLong(params.createTime);
|
||||
}catch(Exception e){
|
||||
log.warn("could not parse createTime param");
|
||||
createTime = -1;
|
||||
}
|
||||
if(createTime != meeting.getCreateTime()){
|
||||
errors.mismatchCreateTimeParam();
|
||||
respondWithErrors(errors);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Is this user joining a meeting that has been ended. If so, complain.
|
||||
if (meeting.isForciblyEnded()) {
|
||||
@ -472,6 +488,8 @@ class ApiController {
|
||||
mtgs.each { m ->
|
||||
meeting() {
|
||||
meetingID(m.getExternalId())
|
||||
meetingName(m.getName())
|
||||
createTime(m.getCreateTime())
|
||||
attendeePW(m.getViewerPassword())
|
||||
moderatorPW(m.getModeratorPassword())
|
||||
hasBeenForciblyEnded(m.isForciblyEnded() ? "true" : "false")
|
||||
@ -752,7 +770,9 @@ class ApiController {
|
||||
render(contentType:"text/xml") {
|
||||
response() {
|
||||
returncode(RESP_CODE_SUCCESS)
|
||||
meetingName(meeting.getName())
|
||||
meetingID(meeting.getExternalId())
|
||||
createTime(meeting.getCreateTime())
|
||||
attendeePW(meeting.getViewerPassword())
|
||||
moderatorPW(meeting.getModeratorPassword())
|
||||
running(meeting.isRunning() ? "true" : "false")
|
||||
|
@ -29,6 +29,10 @@ public class ApiErrors {
|
||||
errors.add(new String[] {"invalidPassword", "The password you submitted is not valid."});
|
||||
}
|
||||
|
||||
public void mismatchCreateTimeParam() {
|
||||
errors.add(new String[] {"mismatchCreateTime", "The createTime parameter submitted mismatches with the current meeting."});
|
||||
}
|
||||
|
||||
public boolean hasErrors() {
|
||||
return errors.size() > 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user