Browse Source

:recycle: cleaned and commented code in prep for testing before code review

tags/0.0.1^2
K Rob 3 years ago
parent
commit
3265703007
2 changed files with 7 additions and 8 deletions
  1. 6
    3
      frontend/src/services/chat.service.js
  2. 1
    5
      frontend/src/services/login.service.js

+ 6
- 3
frontend/src/services/chat.service.js View File

@@ -102,9 +102,10 @@ class Chatter {
102 102
             
103 103
         //  step 1: build the this.groupings object from the backend
104 104
         this.getGroupingsByProfileId(this.uuid)
105
-        //  step 2: build the this.subscriptions array from the this.groupings object
106
-        console.log('this.subscriptions: ', this.subscriptions)
105
+        
107 106
         //  step 3: subscribe to the this.subscriptions array
107
+        console.log('this.subscriptions: ', this.subscriptions)
108
+        
108 109
         this._listenFor({ listeners: this.listeners })
109 110
         this._subscribe(this.subscriptions)
110 111
     }
@@ -134,12 +135,14 @@ class Chatter {
134 135
     _listenFor({ listeners }) {
135 136
         providerMethods['listen'](listeners)
136 137
     }
137
-
138
+    
139
+    //  step 2: build the this.subscriptions array from the this.groupings object
138 140
     // fetch all groupings for this profile and then store them in the chatter groupings object for reference
139 141
     async getGroupingsByProfileId(profileId) {
140 142
         console.log('fetching groupings for profileId:', profileId)
141 143
         const groupings = await fetchMembershipsByProfileId(profileId)
142 144
         this.groupings = groupings
145
+       
143 146
         this.createChannelNamesByGroupings(this.groupings)
144 147
     }
145 148
     // building a list of channel names from the groupings object.grouping_name

+ 1
- 5
frontend/src/services/login.service.js View File

@@ -105,11 +105,7 @@ class Login {
105 105
         this.chatter = new Chatter()
106 106
         // Use the reactive id object
107 107
         const testAccountUUID = this.id.value
108
-        this.chatter.setup(testAccountUUID).then(() => {
109
-            console.log('chatter setup complete')
110
-           
111
-        })
112
-        
108
+        this.chatter.setup(testAccountUUID)
113 109
     }
114 110
 
115 111
     

Loading…
Cancel
Save