Просмотр исходного кода

:recycle: Removed now unnecessary console logs and old notes

tags/0.0.3^2
tomit4 2 лет назад
Родитель
Сommit
013e718add

+ 0
- 2
frontend/src/components/onboarding/Auth.vue Просмотреть файл

@@ -51,12 +51,10 @@ export default {
51 51
             const sessionToken = await this.getSessionToken({
52 52
                 ...this.answered,
53 53
             })
54
-            console.log('sessionToken :=>', sessionToken)
55 54
             const sessionInfo = await this.authenticator.sendAuthEmail({
56 55
                 ...this.answered,
57 56
                 sessionToken: sessionToken,
58 57
             })
59
-            console.log('sessionInfo :=>', sessionInfo)
60 58
             document.cookie = `siimee_session=${sessionInfo.hashedSessionToken}; max-age=600; path=/; secure`
61 59
         } catch (err) {
62 60
             // TODO: render an error page in this component displaying which

+ 1
- 7
frontend/src/views/LoginView.vue Просмотреть файл

@@ -7,8 +7,7 @@ main.view--login
7 7
             w-input(label="Password" type="password" tile outline inner-icon-left='icon-eye')
8 8
 
9 9
             //- Emit up an event so we can sync App pid with currentProfile.id
10
-            // w-button.xs12.mt12(@click="$emit('updatePid', form.profileId)" type="submit") submit
11
-            w-button.xs12.mt12(@click="something()") submit
10
+            w-button.xs12.mt12(@click="$emit('updatePid', form.profileId)" type="submit") submit
12 11
 </template>
13 12
 
14 13
 <script>
@@ -18,10 +17,5 @@ export default {
18 17
             profileId: null,
19 18
         },
20 19
     }),
21
-    methods: {
22
-        something() {
23
-            console.log('something :=>')
24
-        }
25
-    }
26 20
 }
27 21
 </script>

+ 4
- 14
frontend/src/views/OnboardingView.vue Просмотреть файл

@@ -61,23 +61,13 @@ export default {
61 61
         invalidResponse: false,
62 62
         authenticator: {},
63 63
     }),
64
-    // TODO: Heavy refactor comes next, now only cookie is session_token,
65
-    // which is currently a hashed Key hashedSessions{} registry on the backend
66
-    // In VerifyView.vue we have  a grabTokenFromHash() method which we can
67
-    // use here to verify any routes
68
-    // AccessToken lives on backend within hashedSessions{} registry
69 64
     async created() {
70 65
         this.survey = await surveyFactory.createSurvey()
71 66
         this.authenticator = new Authenticator()
72 67
         hashedSessionToken = this.grabStoredCookie('siimee_session')
73 68
         try {
74 69
             const sessionData = await this.verifySession(hashedSessionToken)
75
-            console.log('sessionData :=>', sessionData)
76
-            // TODO: Validate All routes hit by these methods using tokens in headers
77
-            // NOTE: This can be accomplished using sessionData.sessionToken,
78
-            // as it currently has the raw session token in it
79
-
80
-            // Move this logic onto the backend and have it
70
+            // TODO: Move this logic onto the backend and have it
81 71
             // returned in verifySession(hashedSessionToken)
82 72
             const userId = await this.grabUserIdByEmail(
83 73
                 sessionData.email,
@@ -117,8 +107,8 @@ export default {
117 107
                 cookieKey in cookies ? cookies[`${cookieKey}`] : undefined
118 108
             return cookieVal
119 109
         },
120
-        // NOTE: sessionToken is flying around far too often
121
-        // hashedAccessToken
110
+        // TODO: sessionToken is flying around far too often,
111
+        // see above TODO regarding moving most of this logic to the backend
122 112
         async verifySession(hashedSessionToken) {
123 113
             if (!hashedSessionToken)
124 114
                 return console.warn('WARNING :=> sessionToken is not defined')
@@ -201,7 +191,7 @@ export default {
201 191
                 this.responses.push(response)
202 192
                 if (k === 'aspects') return
203 193
             }
204
-            // if user as finished minimum profile creation,
194
+            // If user has finished minimum profile creation,
205 195
             // Adds survey answers to responses table and verifies tokens on each step
206 196
             if (currentProfileId) {
207 197
                 await surveyFactory.addNewSurveyAnswer(

Загрузка…
Отмена
Сохранить