Skip to content

Commit ca32cc3

Browse files
committed
Updating the awaits.
1 parent fb6ea17 commit ca32cc3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

v2.0/helpers/validation/validateuser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ const checktoken = async function(req, res, next) {
3434
},
3535
});
3636
if (postresponse.status === 200) {
37-
console.log(postresponse.text());
38-
const result = JSON.parse(postresponse.text());
37+
const responsetext = await postresponse.text();
38+
const result = await JSON.parse(responsetext);
3939
if (Object.keys(result).includes('error')) {
4040
const msg = 'The ORCID token passed to Neotoma is not valid:' +
4141
token;

0 commit comments

Comments
 (0)