Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
adding parse function to response data
Browse files Browse the repository at this point in the history
  • Loading branch information
iietmoon committed Jan 26, 2022
1 parent db759cb commit fa03eed
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pages/success.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,15 @@ export default {
if (route.query.access_token != null) {
await $axios.get('/verifier-api/auth?access_token=' + route.query.access_token)
.then((response) => {
result = response.data
console.log('response.data')
console.log(response.data)
result = JSON.parse(response.data)
console.log(JSON.parse(response.data))
return $axios.get('/verifier-api/protected', {
headers: {
Authorization: 'Bearer ' + result.auth_token
}
})
})
.then((dataResponse) => {
console.log('dataResponse.data')
console.log(dataResponse.data)
protectedData = JSON.parse(dataResponse.data)
})
.catch((error) => {
Expand Down

0 comments on commit fa03eed

Please sign in to comment.