Skip to content

Commit

Permalink
Merge pull request #206 from ddjnw1yu/annotator-auth-issue
Browse files Browse the repository at this point in the history
Fix annotator auth issue
  • Loading branch information
alan-wu authored Sep 23, 2024
2 parents 266d92d + 5672f67 commit af1289f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pages/user/profile/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,12 @@ export default {
"Cache-Control": "no-store"
}
let annotatorAuthenticated = false
const url = `${config.public.flatmap_api}annotator/authenticate?key=${mainStore.userToken}&session=`
annotatorAuthenticated = await $axios.get(url, { headers }).then(() => {
return true
const url = `${config.public.flatmap_api}/annotator/authenticate?key=${mainStore.userToken}`
annotatorAuthenticated = await $axios.get(url, { headers }).then((response) => {
if (response.data.data.canUpdate) {
return true
}
return false
}).catch(() => {
return false
})
Expand Down

0 comments on commit af1289f

Please sign in to comment.