From 5672f675f002b107362844212be5a0a276eebe8d Mon Sep 17 00:00:00 2001 From: "David J. Yu" <87633683+ddjnw1yu@users.noreply.github.com> Date: Mon, 23 Sep 2024 13:59:53 +1200 Subject: [PATCH] User need to be in the annotation team to see shortcut --- pages/user/profile/index.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pages/user/profile/index.vue b/pages/user/profile/index.vue index 1e624ca5..99bfeb1f 100644 --- a/pages/user/profile/index.vue +++ b/pages/user/profile/index.vue @@ -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 })