Skip to content

Commit

Permalink
Correctly passing Auth header and query string parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
muvashi committed Apr 17, 2024
1 parent e7d95e9 commit 2c86836
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ async function addToGroup() {
},
headers: {
'Content-Type' : 'application/json',
Authorization: `${(await fetchAuthSession()).tokens.accessToken.payload}`
Authorization: `${(await fetchAuthSession()).tokens.accessToken}`
}
}
return post({apiName, path, options});
Expand All @@ -177,13 +177,13 @@ async function listEditors(limit){
let apiName = 'AdminQueries';
let path = '/listUsersInGroup';
let options = {
queryStringParameters: {
queryParams: {
"groupname": "Editors",
"limit": limit,
},
headers: {
'Content-Type' : 'application/json',
Authorization: `${(await fetchAuthSession()).tokens.accessToken.payload}`
Authorization: `${(await fetchAuthSession()).tokens.accessToken}`
}
}
const response = await get({apiName, path, options});
Expand Down

0 comments on commit 2c86836

Please sign in to comment.