@@ -50,11 +50,13 @@ const FEATURE_NAME = 'compare';
50
50
}
51
51
52
52
if ( ! params . qstring . events || params . qstring . events . length === 0 ) {
53
- return common . returnMessage ( params , 400 , 'Missing parameter: events' ) ;
53
+ common . returnMessage ( params , 400 , 'Missing parameter: events' ) ;
54
+ return true ;
54
55
}
55
56
56
57
if ( params . qstring . events . length > 20 ) {
57
- return common . returnMessage ( params , 400 , 'Maximum length for parameter events is 20' ) ;
58
+ common . returnMessage ( params , 400 , 'Maximum length for parameter events is 20' ) ;
59
+ return true ;
58
60
}
59
61
60
62
validateRead ( params , FEATURE_NAME , function ( ) {
@@ -132,17 +134,20 @@ const FEATURE_NAME = 'compare';
132
134
}
133
135
134
136
if ( ! params . qstring . apps || params . qstring . apps . length === 0 ) {
135
- return common . returnMessage ( params , 400 , 'Missing parameter: apps' ) ;
137
+ common . returnMessage ( params , 400 , 'Missing parameter: apps' ) ;
138
+ return true ;
136
139
}
137
140
138
141
if ( params . qstring . apps . length > 20 ) {
139
- return common . returnMessage ( params , 400 , 'Maximum length for parameter apps is 20' ) ;
142
+ common . returnMessage ( params , 400 , 'Maximum length for parameter apps is 20' ) ;
143
+ return true ;
140
144
}
141
145
142
146
var appsToFetch = params . qstring . apps ;
143
147
for ( var appsFetchIndex = 0 ; appsFetchIndex < appsToFetch . length ; appsFetchIndex ++ ) {
144
148
if ( appsToFetch [ appsFetchIndex ] . length !== 24 ) {
145
- return common . returnMessage ( params , 400 , 'Invalid app id length in apps parameter, each app id should be 24 characters long' ) ;
149
+ common . returnMessage ( params , 400 , 'Invalid app id length in apps parameter, each app id should be 24 characters long' ) ;
150
+ return true ;
146
151
}
147
152
}
148
153
params . qstring . app_id = appsToFetch [ 0 ] ;
@@ -153,11 +158,13 @@ const FEATURE_NAME = 'compare';
153
158
for ( var i = 0 ; i < appsToFetch . length ; i ++ ) {
154
159
if ( params . member && userApps ) {
155
160
if ( userApps . indexOf ( appsToFetch [ i ] ) === - 1 ) {
156
- return common . returnMessage ( params , 401 , 'User does not have view rights for one or more apps provided in apps parameter' ) ;
161
+ common . returnMessage ( params , 401 , 'User does not have view rights for one or more apps provided in apps parameter' ) ;
162
+ return true ;
157
163
}
158
164
}
159
165
else {
160
- return common . returnMessage ( params , 401 , 'User does not have view rights for one or more apps provided in apps parameter' ) ;
166
+ common . returnMessage ( params , 401 , 'User does not have view rights for one or more apps provided in apps parameter' ) ;
167
+ return true ;
161
168
}
162
169
}
163
170
}
0 commit comments