Skip to content

Commit

Permalink
Use Object.fromEntries()
Browse files Browse the repository at this point in the history
  • Loading branch information
joehoyle committed Feb 29, 2024
1 parent 8a3a703 commit 36d08bf
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/test-private-upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ async function getPresignedUrlParams( key: string ) : Promise<Args> {
expiresIn: 60,
} ) );

let queryStringParameters: Args = {};
presignedUrl.searchParams.forEach( ( value, key ) => {
queryStringParameters[ key as keyof Args ] = value;
} );
const queryStringParameters: Args = Object.fromEntries( presignedUrl.searchParams.entries() );

return queryStringParameters;
}
Expand Down

0 comments on commit 36d08bf

Please sign in to comment.