Przeglądaj źródła

:fire: removing unneeded logs

tags/0.0.1^2
J 3 lat temu
rodzic
commit
9b1ea09c8c

+ 2
- 1
backend/lib/routes/membership/active.js Wyświetl plik

@@ -53,7 +53,8 @@ module.exports = {
53 53
                 profileId,
54 54
                 membershipType,
55 55
             )
56
-            console.log('groupings :>> ', groupings)
56
+            // console.log('groupings :>> ', groupings)
57
+
57 58
             /**
58 59
              * Heavily process the result by storing just a profile_id
59 60
              * and attach complete profiles

+ 1
- 1
backend/lib/services/membership.js Wyświetl plik

@@ -70,7 +70,7 @@ module.exports = class MembershipService extends Schmervice.Service {
70 70
             profileId,
71 71
             type,
72 72
         )
73
-        console.log('dedupedGroupings :>> ', dedupedGroupings)
73
+
74 74
         /** Grab just the Groupings this id has a Membership for */
75 75
         return await Grouping.query()
76 76
             .whereIn('grouping_id', dedupedGroupings)

+ 6
- 20
backend/lib/services/user.js Wyświetl plik

@@ -148,8 +148,6 @@ module.exports = class UserService extends Schmervice.Service {
148 148
     async login({ email, password }, txn) {
149 149
         const { User, Auth } = this.server.models()
150 150
 
151
-        
152
-        
153 151
         const user = await Auth.query(txn)
154 152
             .throwIfNotFound()
155 153
             .first()
@@ -159,11 +157,9 @@ module.exports = class UserService extends Schmervice.Service {
159 157
 
160 158
         /** Uncomment to run password check using SecurePassword */
161 159
         const passwordCheck = await this.pwd.verify(bufferPepper, user.token)
162
-        console.log("passwordCheck", passwordCheck)
163 160
         if (passwordCheck === SecurePassword.VALID_NEEDS_REHASH) {
164 161
             await this.changePassword(user.user_email, password, txn)
165
-        }
166
-        else if (passwordCheck !== SecurePassword.VALID) {
162
+        } else if (passwordCheck !== SecurePassword.VALID) {
167 163
             throw User.createNotFoundError()
168 164
         }
169 165
 
@@ -202,30 +198,20 @@ module.exports = class UserService extends Schmervice.Service {
202 198
      * @returns {number}
203 199
      */
204 200
     async changePassword(email, password, txn) {
205
-        const { User, Auth } = this.server.models()
206
-
207
-        console.log('email passed to changePassword', email)
201
+        const { Auth } = this.server.models()
208 202
 
209
-        const hashed = await this.pwd.hash(Buffer.from(process.env.PEPPER + password))
210
-        console.log('hashed', hashed)
203
+        const hashed = await this.pwd.hash(
204
+            Buffer.from(process.env.PEPPER + password),
205
+        )
211 206
 
212 207
         await Auth.query(txn)
213 208
             .throwIfNotFound()
214 209
             .where({ user_email: email })
215 210
             .patch({
216 211
                 // user_email: email,
217
-                token: hashed
212
+                token: hashed,
218 213
             })
219
-        console.log('changePassword query completed')
220 214
         return email
221
-
222
-        // await User.query(txn)
223
-        //     .throwIfNotFound()
224
-        //     .where({ id })
225
-        //     .patch({
226
-        //         password: await this.pwd.hash(Buffer.from(password)),
227
-        //     })
228
-        // return id
229 215
     }
230 216
 
231 217
     async getPassword(email, txn) {

+ 0
- 6
frontend/src/components/ProfileCardList.vue Wyświetl plik

@@ -85,7 +85,6 @@ const randomize = max => {
85 85
 }
86 86
 
87 87
 // AHP Button behavior
88
-
89 88
 const accept = async targetId => {
90 89
     if (targetId == props.pid) return
91 90
     // need to pass these arguments (profileId, targetId, status)
@@ -101,11 +100,8 @@ const accept = async targetId => {
101 100
 
102 101
     // Reuse old grouping name if theres a match
103 102
     let channel = groupingName
104
-    console.log('membershipMatch :>> ', membershipMatch)
105 103
     if (membershipMatch?.hasMatch) {
106
-        const [time, intiator, target] = groupingName.split('_')
107 104
         channel = membershipMatch.groupings[0].grouping_name
108
-        console.log('channel :>> ', channel)
109 105
     }
110 106
     await subscribeToChannel(channel)
111 107
     emit('reload')
@@ -118,7 +114,6 @@ const view = pid => {
118 114
 const subscribeToChannel = async channelName => {
119 115
     // create a chatter reference from the current profile
120 116
     const chatter = currentProfile.chatter
121
-    // console.log('mock sender:', pid)
122 117
 
123 118
     /**
124 119
      * publish a new message to the chatter with the channel and the message & title is optional
@@ -130,7 +125,6 @@ const subscribeToChannel = async channelName => {
130 125
         description: `This is the checking to see if we are subscribed to the ${channelName} channel!`,
131 126
     })
132 127
     // PubNub response will be a timecode of when the message was published
133
-    console.log('res:', res)
134 128
     //router.push({ path: `/chat/${pid}` })
135 129
 }
136 130
 

+ 1
- 2
frontend/src/services/chat.service.js Wyświetl plik

@@ -67,7 +67,6 @@ class Chatter {
67 67
 
68 68
         this.listeners = {
69 69
             status: async e => {
70
-                // await this.publish(this.subscriptions[0], testMessage)
71 70
                 if (e.category !== 'PNConnectedCategory') return
72 71
             },
73 72
             message: null, // Set manually in chat view
@@ -101,7 +100,7 @@ class Chatter {
101 100
      * @return {object} timestamp
102 101
      */
103 102
     async publish(channel, message) {
104
-        console.log('publishing message to channel:', channel)
103
+        // console.log('publishing message to channel:', channel)
105 104
         return providerMethods.publish({ channel, message })
106 105
     }
107 106
     /**

+ 1
- 18
frontend/src/services/survey.service.js Wyświetl plik

@@ -16,20 +16,6 @@ const fetchQuestions = async () => {
16 16
     })
17 17
 }
18 18
 
19
-// TODO: Remove
20
-const saveSurveyByProfileId = async (surveyResponses, profileId) => {
21
-    surveyResponses.forEach(responseKeyIdwithVal => {
22
-        const keyId = responseKeyIdwithVal.response_key_id
23
-        const val = responseKeyIdwithVal.val
24
-        console.log(keyId, val)
25
-        // POST
26
-        // const myresponses = db.post(
27
-        //     `/profile/${profileId}/respond?response_key_id=${keyId}&val=${val}`,
28
-        // )
29
-        // return myresponses
30
-    })
31
-}
32
-
33 19
 const updateSurveyByProfileId = async (surveyResponses, profileId) => {
34 20
     surveyResponses.forEach(responseKeyIdwithVal => {
35 21
         const keyId = responseKeyIdwithVal.response_key_id
@@ -54,14 +40,11 @@ const scoreSurveyByProfileId = async (profileId, maxDistance = 99) => {
54 40
 }
55 41
 
56 42
 const fetchResponsesByProfileId = async profileId => {
57
-    return await db.get(
58
-        `/profile/${profileId}/responses`,
59
-    )
43
+    return await db.get(`/profile/${profileId}/responses`)
60 44
 }
61 45
 
62 46
 export {
63 47
     fetchQuestions,
64
-    saveSurveyByProfileId,
65 48
     updateSurveyByProfileId,
66 49
     scoreSurveyByProfileId,
67 50
     fetchResponsesByProfileId,

Ładowanie…
Anuluj
Zapisz