ソースを参照

:construction: small changes necessary for working email auth

tags/0.0.3^2
juancarbajal98 2年前
コミット
855c9a1e0c

+ 1
- 1
backend/lib/routes/user/getsession.js ファイルの表示

@@ -20,7 +20,7 @@ module.exports = {
20 20
         tags: ['api'],
21 21
         auth: false,
22 22
         cors: {
23
-            headers: ['Authorization'],
23
+            headers: ['Authorization', 'Content-Type'],
24 24
             exposedHeaders: ['Authorization', 'Access-Control-Expose-Headers'],
25 25
         },
26 26
         handler: async function (request, h) {

+ 1
- 1
backend/lib/routes/user/validatesession.js ファイルの表示

@@ -21,7 +21,7 @@ module.exports = {
21 21
         tags: ['api'],
22 22
         auth: false,
23 23
         cors: {
24
-            headers: ['Authorization'],
24
+            headers: ['Authorization', 'Content-Type'],
25 25
             exposedHeaders: ['Authorization', 'Access-Control-Expose-Headers'],
26 26
         },
27 27
         handler: async function (request, h) {

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

@@ -361,7 +361,7 @@ module.exports = class UserService extends Schmervice.Service {
361 361
                     email: userCredentials.email,
362 362
                 },
363 363
             ],
364
-            templateId: 1,
364
+            templateId: 2,
365 365
             params: {
366 366
                 // TODO: Change this in production...
367 367
                 link: `localhost:3000/verify/${hashedSessionToken}`,

+ 2
- 1
frontend/src/entities/survey/survey.answer.validator.js ファイルの表示

@@ -10,7 +10,8 @@ const answerValidator = {
10 10
     // TODO: change to valdate against JWT??
11 11
     auth: Joi.any(),
12 12
 
13
-    password: Joi.string().min(10).max(30).pattern(new RegExp('[a-zA-Z0-9]+')),
13
+    // password: Joi.string().min(10).max(30).pattern(new RegExp('[a-zA-Z0-9]+')),
14
+    password: Joi.string().max(30).pattern(new RegExp('[a-zA-Z0-9]+')),
14 15
     // TODO: Change if going international (only works in usa)
15 16
     zipcode: Joi.string().min(5).max(5).pattern(new RegExp('^[0-9]{5}$')),
16 17
     seeking: Joi.string(),

+ 0
- 4
frontend/src/entities/survey/survey.js ファイルの表示

@@ -37,10 +37,6 @@ class Survey extends _baseRecord {
37 37
         /**  Fields */
38 38
         this.steps = [...questionSteps] // ! required
39 39
         this.aspectQuestions = _formatAspectQuestions(this.steps)
40
-        console.log(
41
-            'this.aspectQuestions: ',
42
-            JSON.stringify(this.aspectQuestions),
43
-        )
44 40
     }
45 41
 
46 42
     hasMinResponsesToCreateProfile(responses) {

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