From c8f33c7fecf4d3ad458a899c3da2c0f633d20106 Mon Sep 17 00:00:00 2001
From: Erik Borgeteien Hansen <erik@erikbhan.no>
Date: Fri, 6 May 2022 10:15:55 +0200
Subject: [PATCH] remove console log, change route to community home after
 creation, add admin status when create group

---
 src/components/CommunityComponents/NewCommunityForm.vue | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/components/CommunityComponents/NewCommunityForm.vue b/src/components/CommunityComponents/NewCommunityForm.vue
index 7a62e90..a088cd5 100644
--- a/src/components/CommunityComponents/NewCommunityForm.vue
+++ b/src/components/CommunityComponents/NewCommunityForm.vue
@@ -278,12 +278,13 @@ export default {
           location: this.group.place,
           picture: this.group.image,
         };
-
-        console.log(this.group.image);
-
         const respone = await postNewgroup(groupInfo);
         if (respone.status === 200 || respone.status === 201) {
-          this.$router.push({ path: "/", replace: true });
+          this.$store.commit("addAdmin", respone.data);
+          this.$router.push({
+            path: "/community/" + respone.data,
+            replace: true,
+          });
         }
       }
     },
-- 
GitLab