|
|
@@ -107,6 +107,7 @@ export default {
|
|
107
|
107
|
cookieKey in cookies ? cookies[`${cookieKey}`] : undefined
|
|
108
|
108
|
return cookieVal
|
|
109
|
109
|
},
|
|
|
110
|
+ // TODO: Possible Security issue, returned .payload has user email in plain text...
|
|
110
|
111
|
async verifyBothTokens() {
|
|
111
|
112
|
const sessionTokenIsValid = await this.verifySessionToken(
|
|
112
|
113
|
sessionToken,
|
|
|
@@ -235,6 +236,8 @@ export default {
|
|
235
|
236
|
this.responses.push(response)
|
|
236
|
237
|
if (k === 'aspects') return
|
|
237
|
238
|
}
|
|
|
239
|
+ // if user as finished minimum profile creation,
|
|
|
240
|
+ // Adds survey answers to responses table and verifies tokens on each step
|
|
238
|
241
|
if (currentProfileId) {
|
|
239
|
242
|
// TODO: Still have to authenticate this route
|
|
240
|
243
|
await surveyFactory.addNewSurveyAnswer(
|