File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 runs-on : ubuntu-latest
77 steps :
88 - uses : actions/checkout@v1
9- - name : Setup Environment (Using NodeJS 16 .x)
9+ - name : Setup Environment (Using NodeJS 10 .x)
1010 uses : actions/setup-node@v1
1111 with :
12- node-version : 16 .x
12+ node-version : 10 .x
1313
1414 - name : Install dependencies
1515 run : npm install
Original file line number Diff line number Diff line change 11module . exports = ( req , url ) => {
22 const [ path , search = '' ] = url . split ( '?' )
3- const searchParams = new URLSearchParams ( search . replaceAll ( '[]=' , '=' ) )
3+ const searchParams = new URLSearchParams ( search . replace ( / \[ \] = / g, '=' ) )
4+
45 const query = { }
56 for ( const [ name , value ] of searchParams . entries ( ) ) {
67 if ( query [ name ] ) {
@@ -11,6 +12,7 @@ module.exports = (req, url) => {
1112 query [ name ] = value
1213 }
1314 }
15+
1416 req . path = path
1517 req . query = query
1618}
You can’t perform that action at this time.
0 commit comments