Skip to content
Snippets Groups Projects
Commit 9e52fcfe authored by Erik Borgeteien Hansen's avatar Erik Borgeteien Hansen
Browse files

bugfix

parent 4cae81fb
No related branches found
No related tags found
1 merge request!88Community admin
Pipeline #180135 failed
...@@ -57,8 +57,8 @@ export default { ...@@ -57,8 +57,8 @@ export default {
this.$router.push("/"); this.$router.push("/");
}, },
}, },
mounted() { async mounted() {
this.admin = CommunityAdminService.isUserAdmin( this.admin = await CommunityAdminService.isUserAdmin(
this.$route.params.communityID this.$route.params.communityID
); );
}, },
......
...@@ -40,13 +40,13 @@ export default { ...@@ -40,13 +40,13 @@ export default {
this.publicCommunities = await getVisibleGroups(); this.publicCommunities = await getVisibleGroups();
this.loggedIn = this.$store.state.user.token !== null; this.loggedIn = this.$store.state.user.token !== null;
if (!this.loggedIn) return; if (!this.loggedIn) return;
this.myCommunities = await getMyGroups(); this.myCommunities = await getMyGroups();
},
mounted() {
// Double loop is bad; find a better way to do this // Double loop is bad; find a better way to do this
for (var i = 0; i < this.publicCommunities.length; i++) { for (var i = 0; i < this.publicCommunities.length; i++) {
for (var j = 0; j < this.myCommunities.length; j++) { for (var j = 0; j < this.myCommunities.length; j++) {
console.log(this.publicCommunities[i]);
console.log(this.myCommunities[j]);
if ( if (
this.publicCommunities[i].communityId === this.publicCommunities[i].communityId ===
this.myCommunities[j].communityId this.myCommunities[j].communityId
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment