ソースを参照

:pencil2: Clean up comments, change sessionToken to sessionData

tags/0.0.3^2
tomit4 3年前
コミット
312d19cabc

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

111
      * @returns
111
      * @returns
112
      */
112
      */
113
     async findByUserEmail(userEmail, txn) {
113
     async findByUserEmail(userEmail, txn) {
114
-        console.log('userEmail :=>', userEmail)
115
         const { User } = this.server.models()
114
         const { User } = this.server.models()
116
         const user = await User.query(txn)
115
         const user = await User.query(txn)
117
             .throwIfNotFound()
116
             .throwIfNotFound()
118
             .first()
117
             .first()
119
             .where({ user_email: userEmail })
118
             .where({ user_email: userEmail })
120
-        console.log('user :=>', user)
121
         return user
119
         return user
122
     }
120
     }
123
 
121
 

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

1
-import { when } from 'joi'
2
 import { db } from '../utils/db.js'
1
 import { db } from '../utils/db.js'
3
 
2
 
4
 /**
3
 /**
16
 }
15
 }
17
 
16
 
18
 const fetchUserByEmail = async userEmail => {
17
 const fetchUserByEmail = async userEmail => {
19
-    console.log('userEmail :=>', userEmail)
20
     return await db.get(`/user/fetchbymail/${userEmail}`)
18
     return await db.get(`/user/fetchbymail/${userEmail}`)
21
 }
19
 }
22
 
20
 

+ 2
- 8
frontend/src/views/OnboardingView.vue ファイルの表示

30
             p(v-if='currentStep != 0') You have completed: {{ currentStep }} / {{ survey.steps.length }} survey steps
30
             p(v-if='currentStep != 0') You have completed: {{ currentStep }} / {{ survey.steps.length }} survey steps
31
 
31
 
32
     article(v-else)
32
     article(v-else)
33
-        SurveyCompleteView(:answers='answered' :surveySteps='survey.steps' :currentProfileId='currentProfileId')
33
+        SurveyCompleteView(:answers='answered' :surveySteps='survey.steps')
34
 </template>
34
 </template>
35
 
35
 
36
 <script>
36
 <script>
41
     fetchProfileByProfileId,
41
     fetchProfileByProfileId,
42
 } from '../services/profile.service.js'
42
 } from '../services/profile.service.js'
43
 import { surveyFactory } from '@/utils'
43
 import { surveyFactory } from '@/utils'
44
-import { currentProfile } from '../services/'
45
 import stepViews from '@/components/onboarding'
44
 import stepViews from '@/components/onboarding'
46
 import SurveyCompleteView from './SurveyCompleteView.vue'
45
 import SurveyCompleteView from './SurveyCompleteView.vue'
47
 
46
 
62
         invalidResponse: false,
61
         invalidResponse: false,
63
         authenticator: {},
62
         authenticator: {},
64
     }),
63
     }),
65
-    computed: {
66
-        cP() {
67
-            return currentProfile ? currentProfile : null
68
-        },
69
-    },
70
     async created() {
64
     async created() {
71
         this.survey = await surveyFactory.createSurvey()
65
         this.survey = await surveyFactory.createSurvey()
72
         this.authenticator = new Authenticator()
66
         this.authenticator = new Authenticator()
77
                     sessionToken,
71
                     sessionToken,
78
                 )
72
                 )
79
                 // NOTE: Left off here, INCOMPLETE, no ACCESS TOKEN yet, crazy amount of logic here...
73
                 // NOTE: Left off here, INCOMPLETE, no ACCESS TOKEN yet, crazy amount of logic here...
80
-                if (sessionToken.isValid) {
74
+                if (sessionData.isValid) {
81
                     const userEmail = sessionData.payload.email
75
                     const userEmail = sessionData.payload.email
82
                     const emailIsInCache =
76
                     const emailIsInCache =
83
                         await this.authenticator.checkEmailCache(userEmail)
77
                         await this.authenticator.checkEmailCache(userEmail)

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