File tree 5 files changed +7
-4
lines changed
5 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import requestIp from 'request-ip';
11
11
import stream from 'stream' ;
12
12
import { getRates as getExchangeRates } from 'services/money' ;
13
13
import { toJson as xmlToJson } from 'utils/xml2json' ;
14
+ import qs from 'qs' ;
14
15
15
16
// Dome API for topcoder communities
16
17
import tcCommunitiesDemoApi from './tc-communities' ;
@@ -34,6 +35,8 @@ const app = express();
34
35
* fix. */
35
36
global . atob = atob ;
36
37
38
+ app . set ( 'query parser' , str => qs . parse ( str , { arrayLimit : 1000 } ) ) ;
39
+
37
40
app . use ( favicon ( path . resolve ( __dirname , '../assets/images/favicon.ico' ) ) ) ;
38
41
app . use ( bodyParser . json ( ) ) ;
39
42
app . use ( bodyParser . urlencoded ( { extended : false } ) ) ;
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export default function ChallengeListingRoute({ meta }) {
20
20
'containers/challenge-listing/Listing' ,
21
21
) . then ( ( { default : ChallengeListing } ) => {
22
22
let query = routeProps . location . search ;
23
- query = query ? qs . parse ( query . slice ( 1 ) ) : { } ;
23
+ query = query ? qs . parse ( query . slice ( 1 ) , { arrayLimit : 1000 } ) : { } ;
24
24
const currencyFromUrl = query ? query . currency : undefined ;
25
25
const prizeMode = currencyFromUrl && `money-${ currencyFromUrl } ` ;
26
26
return (
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export default function ChallengeListingRoute() {
20
20
'containers/challenge-listing/Listing' ,
21
21
) . then ( ( { default : ChallengeListing } ) => {
22
22
const query = renderProps . location . search ?
23
- qs . parse ( renderProps . location . search . slice ( 1 ) ) : null ;
23
+ qs . parse ( renderProps . location . search . slice ( 1 ) , { arrayLimit : 1000 } ) : null ;
24
24
const currencyFromUrl = _ . get ( query , 'currency' ) ;
25
25
const prizeMode = currencyFromUrl && `money-${ currencyFromUrl } ` ;
26
26
return (
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ class ChallengesService {
116
116
filter : qs . stringify ( filters ) ,
117
117
...params ,
118
118
} ;
119
- return this . private . api . get ( `${ endpoint } ?${ qs . stringify ( query ) } ` )
119
+ return this . private . api . get ( `${ endpoint } ?${ qs . stringify ( query , { arrayLimit : 1000 } ) } ` )
120
120
. then ( res => ( res . ok ? res . json ( ) : new Error ( res . statusText ) ) )
121
121
. then ( res => (
122
122
res . result . status === 200 ? {
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import qs from 'qs';
19
19
*/
20
20
export function updateQuery ( update ) {
21
21
if ( ! window ) return ;
22
- let query = qs . parse ( window . location . search . slice ( 1 ) ) ;
22
+ let query = qs . parse ( window . location . search . slice ( 1 ) , { arrayLimit : 1000 } ) ;
23
23
24
24
/* _.merge won't work here, because it just ignores the fields explicitely
25
25
* set as undefined in the objects to be merged, rather than deleting such
You can’t perform that action at this time.
0 commit comments