Revert constrants key names to previous names
This commit is contained in:
parent
13e71ac6c4
commit
0c56df9ac8
@ -16,7 +16,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
@Retention(RUNTIME)
|
||||
public @interface MeetingExistsConstraint {
|
||||
|
||||
String key() default "meetingNotFound";
|
||||
String key() default "notFound";
|
||||
String message() default "A meeting with that ID does not exist";
|
||||
Class<?>[] groups() default {};
|
||||
Class<? extends Payload>[] payload() default {};
|
||||
|
@ -16,7 +16,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
@Retention(RUNTIME)
|
||||
public @interface UserSessionConstraint {
|
||||
|
||||
String key() default "sessionMissing";
|
||||
String key() default "missingSession";
|
||||
String message() default "Invalid session token";
|
||||
Class<?>[] groups() default {};
|
||||
Class<? extends Payload>[] payload() default {};
|
||||
|
@ -211,7 +211,7 @@ class JoinHandler extends Component {
|
||||
}, 'User successfully went through main.joinRouteHandler');
|
||||
} else {
|
||||
|
||||
if(['sessionMissing','meetingForciblyEnded','meetingNotFound'].includes(response.messageKey)) {
|
||||
if(['missingSession','meetingForciblyEnded','notFound'].includes(response.messageKey)) {
|
||||
JoinHandler.setError('410');
|
||||
Session.set('errorMessageDescription', 'meeting_ended');
|
||||
} else if(response.messageKey == "guestDeny") {
|
||||
|
@ -801,7 +801,7 @@ class ApiController {
|
||||
log.debug CONTROLLER_NAME + "#${API_CALL}"
|
||||
|
||||
String respMessage = "Session not found."
|
||||
String respMessageKey = "sessionMissing"
|
||||
String respMessageKey = "missingSession"
|
||||
boolean reject = false;
|
||||
|
||||
String sessionToken
|
||||
@ -1831,7 +1831,7 @@ class ApiController {
|
||||
|
||||
if(apiCall == ValidationService.ApiCall.ENTER) {
|
||||
//Check if error exist following an order (to avoid showing guestDeny when the meeting doesn't even exist)
|
||||
String[] enterConstraintsKeys = new String[] {"sessionMissing","meetingForciblyEnded","meetingNotFound","guestDeny"}
|
||||
String[] enterConstraintsKeys = new String[] {"missingSession","meetingForciblyEnded","notFound","guestDeny"}
|
||||
for (String constraintKey : enterConstraintsKeys) {
|
||||
if(violations.containsKey(constraintKey)) {
|
||||
response = new AbstractMap.SimpleEntry<String, String>(constraintKey, violations.get(constraintKey))
|
||||
|
Loading…
Reference in New Issue
Block a user