Skip to content

Commit

Permalink
fix: Avoid initialize kudos api when accessing public site - MEED-6225
Browse files Browse the repository at this point in the history
…- Meeds-io/meeds#1905 (#477)

Before this change, errors were listed when accessing the public site
linked to the Kudos API
  • Loading branch information
AzmiTouil committed Apr 25, 2024
1 parent 29e7514 commit dc0f876
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions kudos-webapps/src/main/webapp/vue-app/kudos/components/KudosApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ export default {
spaceId: eXo.env.portal.spaceId,
spacePrettyName: eXo.env.portal.spaceName,
audienceChoice: null,
noReceiverIdentityId: false
noReceiverIdentityId: false,
isPublicSite: eXo.env.portal.portalName === 'public',
};
},
watch: {
Expand Down Expand Up @@ -323,15 +324,16 @@ export default {
}
},
created() {
this.init()
.then(() => {
if (this.disabled) {
return;
}
this.$refs.kudosAPI.init();
document.addEventListener('exo-kudos-open-send-modal', this.openDrawer);
});
if (!this.isPublicSite) {
this.init()
.then(() => {
if (this.disabled) {
return;
}
this.$refs.kudosAPI.init();
document.addEventListener('exo-kudos-open-send-modal', this.openDrawer);
});
}
},
computed: {
searchOptions() {
Expand Down

0 comments on commit dc0f876

Please sign in to comment.