ソースを参照

:fire: removing unneeded logs

tags/0.0.1^2
J 3年前
コミット
9b1ea09c8c

+ 2
- 1
backend/lib/routes/membership/active.js ファイルの表示

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

+ 1
- 1
backend/lib/services/membership.js ファイルの表示

70
             profileId,
70
             profileId,
71
             type,
71
             type,
72
         )
72
         )
73
-        console.log('dedupedGroupings :>> ', dedupedGroupings)
73
+
74
         /** Grab just the Groupings this id has a Membership for */
74
         /** Grab just the Groupings this id has a Membership for */
75
         return await Grouping.query()
75
         return await Grouping.query()
76
             .whereIn('grouping_id', dedupedGroupings)
76
             .whereIn('grouping_id', dedupedGroupings)

+ 6
- 20
backend/lib/services/user.js ファイルの表示

148
     async login({ email, password }, txn) {
148
     async login({ email, password }, txn) {
149
         const { User, Auth } = this.server.models()
149
         const { User, Auth } = this.server.models()
150
 
150
 
151
-        
152
-        
153
         const user = await Auth.query(txn)
151
         const user = await Auth.query(txn)
154
             .throwIfNotFound()
152
             .throwIfNotFound()
155
             .first()
153
             .first()
159
 
157
 
160
         /** Uncomment to run password check using SecurePassword */
158
         /** Uncomment to run password check using SecurePassword */
161
         const passwordCheck = await this.pwd.verify(bufferPepper, user.token)
159
         const passwordCheck = await this.pwd.verify(bufferPepper, user.token)
162
-        console.log("passwordCheck", passwordCheck)
163
         if (passwordCheck === SecurePassword.VALID_NEEDS_REHASH) {
160
         if (passwordCheck === SecurePassword.VALID_NEEDS_REHASH) {
164
             await this.changePassword(user.user_email, password, txn)
161
             await this.changePassword(user.user_email, password, txn)
165
-        }
166
-        else if (passwordCheck !== SecurePassword.VALID) {
162
+        } else if (passwordCheck !== SecurePassword.VALID) {
167
             throw User.createNotFoundError()
163
             throw User.createNotFoundError()
168
         }
164
         }
169
 
165
 
202
      * @returns {number}
198
      * @returns {number}
203
      */
199
      */
204
     async changePassword(email, password, txn) {
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
         await Auth.query(txn)
207
         await Auth.query(txn)
213
             .throwIfNotFound()
208
             .throwIfNotFound()
214
             .where({ user_email: email })
209
             .where({ user_email: email })
215
             .patch({
210
             .patch({
216
                 // user_email: email,
211
                 // user_email: email,
217
-                token: hashed
212
+                token: hashed,
218
             })
213
             })
219
-        console.log('changePassword query completed')
220
         return email
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
     async getPassword(email, txn) {
217
     async getPassword(email, txn) {

+ 0
- 6
frontend/src/components/ProfileCardList.vue ファイルの表示

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

+ 1
- 2
frontend/src/services/chat.service.js ファイルの表示

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

+ 1
- 18
frontend/src/services/survey.service.js ファイルの表示

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
 const updateSurveyByProfileId = async (surveyResponses, profileId) => {
19
 const updateSurveyByProfileId = async (surveyResponses, profileId) => {
34
     surveyResponses.forEach(responseKeyIdwithVal => {
20
     surveyResponses.forEach(responseKeyIdwithVal => {
35
         const keyId = responseKeyIdwithVal.response_key_id
21
         const keyId = responseKeyIdwithVal.response_key_id
54
 }
40
 }
55
 
41
 
56
 const fetchResponsesByProfileId = async profileId => {
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
 export {
46
 export {
63
     fetchQuestions,
47
     fetchQuestions,
64
-    saveSurveyByProfileId,
65
     updateSurveyByProfileId,
48
     updateSurveyByProfileId,
66
     scoreSurveyByProfileId,
49
     scoreSurveyByProfileId,
67
     fetchResponsesByProfileId,
50
     fetchResponsesByProfileId,

読み込み中…
キャンセル
保存