Преглед изворни кода

scoreSurvey, updateQueue, buttons to accept/pass

tags/0.0.1
diaseu пре 4 година
родитељ
комит
4cc7e3207f

+ 1
- 7
backend/db/mock.js Прегледај датотеку

@@ -36,7 +36,7 @@ module.exports = {
36 36
         {
37 37
             response_key_id: 6,
38 38
             response_key_category: 'respect',
39
-            response_key_prompt: 'what is your quest',
39
+            response_key_prompt: 'what kind of schedule are you looking for',
40 40
             response_key_description: null,
41 41
         },
42 42
         {
@@ -45,12 +45,6 @@ module.exports = {
45 45
             response_key_prompt: 'what is your zip code',
46 46
             response_key_description: null,
47 47
         },
48
-        {
49
-            response_key_id: 8,
50
-            response_key_category: 'durationPref',
51
-            response_key_prompt: 'what kind of schedule are you looking for',
52
-            response_key_description: null,
53
-        },
54 48
     ],
55 49
     responses: [],
56 50
     memberships: [],

+ 1
- 0
backend/lib/models/profile.js Прегледај датотеку

@@ -31,6 +31,7 @@ module.exports = class Profile extends Schwifty.Model {
31 31
         return Joi.object({
32 32
             profile_id: Joi.number(),
33 33
             user_id: Joi.number(),
34
+            user_media: Joi.string(),
34 35
         })
35 36
     }
36 37
 }

+ 6
- 0
backend/lib/routes/profile/patch-queue.js Прегледај датотеку

@@ -15,8 +15,12 @@ const responseSchemas = {
15 15
         Joi.alternatives().try(
16 16
             Joi.number(),
17 17
             Joi.object({
18
+                // ORIGINAL
18 19
                 profile_id: Joi.number(),
19 20
                 user_id: Joi.number(),
21
+                // Added user_name, user_media to account for updated CompleteProfile
22
+                user_name: Joi.string(),
23
+                user_media: Joi.string(),
20 24
                 responses: Joi.array().items(),
21 25
                 user_type: Joi.any(),
22 26
             }),
@@ -40,11 +44,13 @@ module.exports = {
40 44
         tags: ['api'],
41 45
         /** Protect this route with authentication? */
42 46
         auth: false,
47
+        cors: true,
43 48
         handler: async function (request, h) {
44 49
             const { profile_id, target_id } = request.params
45 50
             const { include_profile, reinsert } = request.query
46 51
             const { profileService, matchQueueService } =
47 52
                 request.server.services()
53
+            console.log('reinsert', reinsert)
48 54
             const updatedQueue = await matchQueueService.markAsDeleted(
49 55
                 profile_id,
50 56
                 target_id,

+ 13
- 2
backend/lib/routes/profile/queue.js Прегледај датотеку

@@ -17,8 +17,9 @@ const responseSchemas = {
17 17
             Joi.object({
18 18
                 profile_id: Joi.number(),
19 19
                 user_id: Joi.number(),
20
+                user_name: Joi.string(),
20 21
                 responses: Joi.array().items(),
21
-                profile_image: Joi.string(),
22
+                user_media: Joi.string(),
22 23
                 user_type: Joi.any(),
23 24
                 user: Joi.object()
24 25
             }),
@@ -42,6 +43,7 @@ module.exports = {
42 43
         tags: ['api'],
43 44
         /** Protect this route with authentication? */
44 45
         auth: false,
46
+        cors: true,
45 47
         handler: async function (request, h) {
46 48
             const { profile_id } = request.params
47 49
             const { include_profile } = request.query
@@ -50,15 +52,24 @@ module.exports = {
50 52
 
51 53
             const queue = await matchQueueService.getQueue(profile_id)
52 54
             const queueIds = queue.map(entry => entry.target_id)
55
+            console.log('queueIds', queueIds)
53 56
             const res =  {
54 57
                 ok:true,
55 58
                 handler: pluginConfig.handlerType,
56 59
                 data: queueIds
57 60
             }
61
+
62
+            // HELP: I think there's an issue here
63
+            // queueIds spits out the queue profiles in the correct order
64
+            // ~However~ when it goes through getProfilesFor
65
+            // it comes back in literal database order regardless of is_deleted status
66
+            console.log(
67
+                'include_profile results',
68
+                await profileService.getProfilesFor(queueIds),
69
+            )
58 70
             if(include_profile) {
59 71
                 res.data = await profileService.getProfilesFor(queueIds)
60 72
             }
61
-            // console.log(res.data)
62 73
             try {
63 74
                 return h.response(res).code(200)
64 75
             } catch (err) {

+ 1
- 1
backend/lib/routes/profile/respond.js Прегледај датотеку

@@ -50,7 +50,7 @@ module.exports = {
50 50
         tags: ['api'],
51 51
         /** Protect this route with authentication? */
52 52
         auth: false,
53
-
53
+        cors: true,
54 54
         handler: async function (request, h) {
55 55
             const { profileService } = request.services()
56 56
 

+ 6
- 0
backend/lib/routes/user/create-profile.js Прегледај датотеку

@@ -32,6 +32,12 @@ const responseSchemas = {
32 32
     response: Joi.object({
33 33
         profile_id: Joi.number(),
34 34
         user_id: Joi.number(),
35
+        // HELP: not sure if this is right, but attempting to fix
36
+        // ValidationError data[0].user_name is not allowed
37
+        // the logic being that CompleteProfile has had user_name added
38
+        // and getCompleteProfiles utilizes CompleteProfile
39
+        // and this route utilizes getCompleteProfiles
40
+        user_name: Joi.string(),
35 41
     }),
36 42
     error: Joi.object({
37 43
         error: Joi.string(),

+ 8
- 0
backend/lib/routes/user/list-profiles.js Прегледај датотеку

@@ -29,6 +29,13 @@ const responseSchemas = {
29 29
     profilesList: Joi.object({
30 30
         profile_id: Joi.number().integer().greater(0).required(),
31 31
         user_id: Joi.number().integer().greater(0).required(),
32
+        // HELP: not sure if this is right, but attempting to fix
33
+        // ValidationError data[0].user_name is not allowed
34
+        // the logic being that CompleteProfile has had user_name added
35
+        // and getCompleteProfiles utilizes CompleteProfile
36
+        // and this route utilizes getCompleteProfiles
37
+        user_name: Joi.string(),
38
+        user_media: Joi.string(),
32 39
         responses: Joi.array().items(
33 40
             Joi.object({
34 41
                 response_key_id: Joi.number().required(),
@@ -62,6 +69,7 @@ module.exports = {
62 69
                 userId,
63 70
                 type,
64 71
             )
72
+            console.log('get profiles - const profiles / in list-profiles.js', profiles)
65 73
             try {
66 74
                 return {
67 75
                     ok: true,

+ 7
- 4
backend/lib/services/profile.js Прегледај датотеку

@@ -43,9 +43,10 @@ const scoreAll = (profileList, userProfile) => {
43 43
  * Grab the zip code string
44 44
  */
45 45
 const getZipCodeFromProfile = profile => {
46
+    console.log('profile getZipCode', profile)
46 47
     // There should only be one zip code entry per profile
47 48
     let zipRes = profile.responses.filter(
48
-        // Whatever the zipcode questions
49
+        // Whatever the zipcode questions is
49 50
         response => response.response_key_id == zipcodeKey,
50 51
     )[0]
51 52
     const responseIndexForZip = profile.responses.indexOf(zipRes)
@@ -65,11 +66,10 @@ class CompleteProfile {
65 66
     constructor(profile, type) {
66 67
         this.user_id = profile.user_id // int user_id
67 68
         this.profile_id = profile.profile_id // int profile_id
68
-        this.profile_image = profile.user_media // int profile_id
69
+        this.user_name = profile.user.user_name // string user_name
70
+        this.user_media = profile.user_media // string user_media
69 71
         this.responses = profile.responses // [] of all responses
70 72
         this.user_type = type
71
-        
72
-        this.user = profile.user
73 73
     }
74 74
 }
75 75
 
@@ -104,6 +104,9 @@ module.exports = class ProfileService extends Schmervice.Service {
104 104
         const profilesEntries = await Profile.query()
105 105
             .whereIn('profile_id', dedupedProfileIds)
106 106
             .withGraphFetched('responses')
107
+            // CHECKTHIS: Added this because we added user.user_name to CompleteProfile
108
+            // so without this, we get undefined user_name
109
+            .withGraphFetched('user')
107 110
 
108 111
         //** Get responses asociated with each profile_id */
109 112
         return profilesEntries.map(profile => {

+ 1
- 1
backend/server/manifest.js Прегледај датотеку

@@ -80,7 +80,7 @@ module.exports = new Confidence.Store({
80 80
                                 user: process.env.DB_USER,
81 81
                                 password: process.env.DB_ROOT_PASSWORD,
82 82
                                 database: process.env.DB_NAME,
83
-                                port: 3307
83
+                                port: 3307,
84 84
                             },
85 85
                         },
86 86
                     },

+ 1
- 0
frontend/src/components/MainNav.vue Прегледај датотеку

@@ -3,6 +3,7 @@ nav#main-header.w-full.f-row.around.p-2
3 3
     router-link.header__icon.mobile--only(to='/matches') matches
4 4
     router-link.header__icon(to='/') home
5 5
     router-link.header__icon.mobile--only(to='/profile') profile
6
+    router-link.header__icon.mobile--only(to='/survey') survey
6 7
 </template>
7 8
 
8 9
 <script>

+ 30
- 21
frontend/src/components/ProfileCardList.vue Прегледај датотеку

@@ -12,24 +12,18 @@ section.profile_card_list.w-full
12 12
             )
13 13
                 .card__content
14 14
                     h3.p-1.mv-0.b-solid.rounded {{ profile.name }}
15
-
16
-        //- TODO: Make functional (using match queue endpoints)
17
-        //- queue.service.js
18
-        //- Call function that calls service that talks to endpoint
19
-        //- Will need GET http://localhost:3001/api/profile/1/queue  <- will look like array with profile ids [2, 3, 4, 6]
20
-        //- Need profile id (logged in profile) and target id (id on card)
21
-
22
-        nav.swipe_icons.w-full.f-row.between
23
-            //- Accept
24
-            button.p-1(@click='accept') A
25
-            //- Hold
26
-            button.p-1(@click='hold') H
27
-            //- Pass
28
-            button.p-1(@click='pass') P
15
+                nav.swipe_icons.w-full.f-row.between
16
+                    //- Accept
17
+                    button.p-1(@click='accept') Accept
18
+                    //- Hold
19
+                    button.p-1(@click='hold') H
20
+                    //- Pass
21
+                    button.p-1(@click='pass') Pass
29 22
 </template>
30 23
 
31 24
 <script setup>
32
-import { computed } from 'vue'
25
+import { computed, defineProps } from 'vue'
26
+import { updateQueueByProfileId } from '../services/queue.service'
33 27
 
34 28
 // TODO: Please review this conversion from script to script setup
35 29
 // converted from the props section
@@ -39,7 +33,7 @@ const props = defineProps({
39 33
         default: () => [
40 34
             {
41 35
                 uid: '1',
42
-                name: 'Fullname',
36
+                name: 'Full Name',
43 37
                 avatar: 'https://hips.hearstapps.com/hmg-prod.s3.amazonaws.com/images/newborn-baby-boy-sleeping-peacefully-wearing-knit-royalty-free-image-1589459736.jpg?crop=0.669xw:1.00xh;0.228xw,0&resize=640:*',
44 38
                 metadata: { age: '21', rawMetadata: 'Some Text Here!' },
45 39
             },
@@ -53,14 +47,18 @@ const props = defineProps({
53 47
 // from the computed section
54 48
 const currentCard = computed(() => props.profiles[props.profiles.length - 1]);
55 49
 // from the method section
56
-const logOut = () => {};
50
+// const logOut = () => {};
57 51
 const reject = () => {
58 52
     swipped(currentCard)
59 53
 }
54
+
55
+
60 56
 const swipped = profile => {
61 57
     const index = props.profiles.findIndex(u => u.uid == profile.uid)
58
+    // TODO: bug, fix this
62 59
     props.profiles.splice(index, 1)
63 60
     profile.id = Date.now() + (Math.random() * 100000).toFixed()
61
+    // TODO: bug, fix this
64 62
     props.profiles.unshift({ ...profile })
65 63
 }
66 64
 const getUser = () => {
@@ -70,14 +68,25 @@ const onRequest = () => {
70 68
 }
71 69
 // AHP Button behavior
72 70
 const accept = () => {
73
-    console.log('accepted')
71
+    console.log('accepted aka do NOT reinsert')
72
+    // need to pass these arguments (profileId, targetId, status)
73
+    // the url structure is
74
+    // const charmander = await db.get(`/profile/{profile_id}/queue/{target_id}/delete?include_profile=true&reinsert=false`)
75
+    // http://localhost:3001/api/profile/38/queue/9/delete?include_profile=true&reinsert=true
76
+    const profileId = props.uid
77
+    const targetId = props.profiles[0].uid
78
+    updateQueueByProfileId(profileId, targetId, false)
79
+    // TODO: next step is grouping/membership
74 80
 }
75 81
 const hold = () => {
76
-    console.log('held')
82
+    console.log('held? do we need this?')
77 83
 }
78 84
 const pass = () => {
79
-    console.log('passed')
80
-
85
+    console.log('passed aka do reinsert')
86
+    // const charmander = await db.get(`/profile/{profile_id}/queue/{target_id}/delete?include_profile=true&reinsert=true`)
87
+    const profileId = props.uid
88
+    const targetId = props.profiles[0].uid
89
+    updateQueueByProfileId(profileId, targetId, true)
81 90
 }
82 91
 
83 92
 // from the data() section

+ 15
- 11
frontend/src/components/form.vue Прегледај датотеку

@@ -12,12 +12,12 @@
12 12
             h3 {{ prompt.question }}?
13 13
             .response-wrapper(v-if='prompt.type === "input-string"')
14 14
                 label {{ prompt.type }}
15
-                input(v-model='answers[makeKebob(prompt.question)]')
15
+                input(v-model='answers[`${prompt.id}-${makeKebob(prompt.question)}`]')
16 16
             .response-wrapper(v-else-if='prompt.type === "tag-cloud"')
17 17
                 label {{ prompt.type }}
18 18
                 button.p-0(
19
-                    :disabled='response == answers[makeKebob(prompt.question)]'
20
-                    :prompt-question='makeKebob(prompt.question)'
19
+                    :disabled='response == answers[`${prompt.id}-${makeKebob(prompt.question)}`]'
20
+                    :prompt-question='`${prompt.id}-${makeKebob(prompt.question)}`'
21 21
                     @click='respondFromTag'
22 22
                     v-for='response in prompt.responses'
23 23
                 ) {{ response }}
@@ -33,7 +33,7 @@
33 33
                         :name='response'
34 34
                         :true-value='response'
35 35
                         false-value=''
36
-                        v-model='answers[makeKebob(prompt.question)]')
36
+                        v-model='answers[`${prompt.id}-${makeKebob(prompt.question)}`]')
37 37
                     label(:for='response') {{ response }}
38 38
             //- Slider from -3 to 0 to +3 (increments of 1)
39 39
             .response-wrapper(v-else-if='prompt.type === "slide"')
@@ -42,8 +42,8 @@
42 42
                     type='range'
43 43
                     min='-3'
44 44
                     max='3'
45
-                    v-model='answers[makeKebob(prompt.question)]')
46
-                span {{ answers[makeKebob(prompt.question)] }}
45
+                    v-model='answers[`${prompt.id}-${makeKebob(prompt.question)}`]')
46
+                span {{ answers[`${prompt.id}-${makeKebob(prompt.question)}`] }}
47 47
 
48 48
     footer.f-row.w-full
49 49
         button.p-1(:disabled='state.step == 1' @click='back') back
@@ -57,7 +57,7 @@
57 57
 import Joi from 'joi'
58 58
 import { validatorMapping, makeKebob } from '@/utils'
59 59
 import { defineProps, reactive, ref } from 'vue'
60
-import { saveSurveyByProfileID } from '../services/survey.service'
60
+import { saveSurveyByProfileID, scoreSurveyByProfileId } from '../services/survey.service'
61 61
 
62 62
 const slidevalue = ref('0')
63 63
 
@@ -98,7 +98,7 @@ const isValid = step => {
98 98
     const schema = {}
99 99
     const answeredThisStep = {}
100 100
     props.form[step].forEach(prompt => {
101
-        const key = makeKebob(prompt.question)
101
+        const key = `${prompt.id}-${makeKebob(prompt.question)}`
102 102
         schema[key] = validatorMapping[prompt.type]
103 103
         answeredThisStep[key] = answers[key]
104 104
     })
@@ -114,8 +114,8 @@ const next = e => {
114 114
         const questiontoResponseKeyId = {}
115 115
         props.form.forEach(step => {
116 116
             step.forEach(prompt => {
117
-                questiontoResponseKeyId[makeKebob(prompt.question)] = prompt.id
118
-            })
117
+                questiontoResponseKeyId[`${prompt.id}-${makeKebob(prompt.question)}`] = prompt.id
118
+                })
119 119
         })
120 120
         const idWithResponseVal = []
121 121
         Object.keys(answers).forEach(answerKey => {
@@ -128,9 +128,13 @@ const next = e => {
128 128
         // Bc we don't want to pass the 1st question to backend & we want profileId
129 129
         // Necessary atm bc we manually added question in Survey class (entity)
130 130
         const profileId = idWithResponseVal.shift().val
131
-
131
+        // TODO: pass maxDistance from an input value somewhere later
132
+        const maxDistance = 10
132 133
         saveSurveyByProfileID(idWithResponseVal, profileId)
134
+        alert('Responses submitted!')
133 135
         resetAnswers()
136
+        // TODO: score here after save survey responses
137
+        scoreSurveyByProfileId(profileId, maxDistance)
134 138
         state.step = 1
135 139
     } else if (state.step < props.form.length) {
136 140
         state.step++

+ 1
- 1
frontend/src/entities/index.js Прегледај датотеку

@@ -4,4 +4,4 @@ export * from './_modules'
4 4
 export * from './response'
5 5
 export * from './profile'
6 6
 export * from './survey'
7
-export * from './grouping'
7
+export * from './grouping'

+ 27
- 12
frontend/src/services/queue.service.js Прегледај датотеку

@@ -1,20 +1,35 @@
1 1
 import { db } from '../utils/db'
2
-// import { Queue } from '../entities/queue'
2
+import { Profile } from '../entities'
3 3
 
4 4
 // TODO: queue services
5 5
 const fetchQueueByProfileId = async profileId => {
6
-    const queue = await db.get(`/profile/{profileId}/queue?include_profile=true`)
7
-
8
-    const profilelist = []
9
-
10
-    // WIP
11
-    // const myMatchQueue = new Queue(profilelist)
12
-    // return myMatchQueue
6
+    const queue = await db.get(
7
+        `/profile/${profileId}/queue?include_profile=true`,
8
+    )
9
+    return queue.map(profileData => {
10
+        return new Profile({ email: null, ...profileData })
11
+    })
13 12
 }
14 13
 
15
-const saveQueueByProfileId = async (targetId, profileId) => {
16
-    // const updateQueue = db.patch(`/profile/{profileId}/queue/{targetId}/delete?include_profile=true&reinsert=true`)
17
-    // return updateQueue
14
+const updateQueueByProfileId = async (profileId, targetId, reinsert) => {
15
+    // Arguments
16
+    // profileId - the id of the profile viewing the queue
17
+    // targetId - the id of the profile viewed by the profileId
18
+    // reinsert - if profileId accepted targetId, FALSE reinsert so no reinsert; if profileId passed targetId, TRUE reinsert so reinsert at end
19
+    //
20
+    const updateQueue = db.patch(
21
+        `/profile/${profileId}/queue/${targetId}/delete?include_profile=true&reinsert=${reinsert}`,
22
+        // HELP: responseScheme says the structure should be array of either:
23
+        // 1) NUMBER
24
+        // or
25
+        // 2) {profile_id, user_id, user_name, user_media, responses, user_type}
26
+        // ~However~ how do we call (2) here? It seems too much to call another API just to fill out a payload, so I just went with (1)
27
+        [
28
+            targetId,
29
+        ],
30
+    )
31
+    console.log('updateQueue', updateQueue)
32
+    return updateQueue
18 33
 }
19 34
 
20
-export { fetchQueueByProfileId, saveQueueByProfileId }
35
+export { fetchQueueByProfileId, updateQueueByProfileId }

+ 18
- 17
frontend/src/services/survey.service.js Прегледај датотеку

@@ -41,17 +41,14 @@ const fetchSurveyByProfileId = async profileId => {
41 41
     return mysurvey
42 42
 }
43 43
 
44
-// TODO: separate to newSurvey vs updateSurvey
45 44
 const saveSurveyByProfileID = async (surveyResponses, profileId) => {
46 45
     surveyResponses.forEach(responseKeyIdwithVal => {
47 46
         const keyId = responseKeyIdwithVal.response_key_id
48 47
         const val = responseKeyIdwithVal.val
49
-        console.log('saveSurvey keyId', keyId)
50
-        console.log('saveSurvey val', val)
51 48
         
52 49
         // POST
53
-        // const myresponses = db.post(`/${profileId}/respond?response_key_id=${keyId}&val=${val}`)
54
-        // return myresponses
50
+        const myresponses = db.post(`/profile/${profileId}/respond?response_key_id=${keyId}&val=${val}`)
51
+        return myresponses
55 52
     })
56 53
 }
57 54
 
@@ -59,24 +56,28 @@ const updateSurveyByProfileId = async (surveyResponses, profileId) => {
59 56
     surveyResponses.forEach(responseKeyIdwithVal => {
60 57
         const keyId = responseKeyIdwithVal.response_key_id
61 58
         const val = responseKeyIdwithVal.val
62
-        console.log('saveSurvey keyId', keyId)
63
-        console.log('saveSurvey val', val)
64 59
         // PATCH
65
-        // const myresponses = db.patch(`/profile/${profileId}/update/${keyId}`,
66
-        //     [
67
-        //         {
68
-        //             response_id: 2,
69
-        //             profile_id: profileId,
70
-        //             response_key_id: keyId,
71
-        //             val: val,
72
-        //         },
73
-        //     ]
74
-        // )
60
+        const myresponses = db.patch(`/profile/${profileId}/update/${keyId}`,
61
+            [
62
+                {
63
+                    response_id: 2,
64
+                    profile_id: profileId,
65
+                    response_key_id: keyId,
66
+                    val: val,
67
+                },
68
+            ]
69
+        )
75 70
     })
76 71
 }
77 72
 
73
+const scoreSurveyByProfileId = async (profileId, maxDistance) => {
74
+    const scoreSurvey = db.get(`/profile/${profileId}/score?max_distance=${maxDistance}`)
75
+    return scoreSurvey
76
+}
77
+
78 78
 export {
79 79
     fetchSurveyByProfileId,
80 80
     saveSurveyByProfileID,
81 81
     updateSurveyByProfileId,
82
+    scoreSurveyByProfileId,
82 83
 }

+ 1
- 1
frontend/src/utils/db.js Прегледај датотеку

@@ -23,7 +23,7 @@ class Connector {
23 23
         this.apiPrefix = prefix
24 24
     }
25 25
     async get(endpoint) {
26
-        const header = { headerTemplate }
26
+        const header = { ...headerTemplate }
27 27
         header.method = 'GET'
28 28
         try {
29 29
             console.log(`${remote}${endpoint}`)

+ 23
- 8
frontend/src/views/home.vue Прегледај датотеку

@@ -25,14 +25,31 @@ export default {
25 25
         user: null,
26 26
         mypid: null,
27 27
     }),
28
-    created() {
28
+    async created() {
29 29
         // this.mypid = auth.currentUser?.mypid || "99999";
30
-        this.mypid = 21
31
-        this.processProfiles()
32
-        // this.queueList = fetchQueueByProfileId(mypid)
33
-        // console.log('queueList', queueList)
30
+        this.mypid = 38
31
+        // Uncomment below to use for batch file data
32
+        // this.processProfilesFromBatch(this.parseBatch([batch_10, batch_20, batch_30]))
33
+
34
+        // Uncomment below to use API
35
+        const queueList = await fetchQueueByProfileId(this.mypid)
36
+        console.log('queueList', queueList)
37
+        this.processQueue(queueList)
34 38
     },
35 39
     methods: {
40
+        processQueue(queueList) {
41
+            const formattedList = []
42
+            queueList.forEach(profile => {
43
+                const formatted = {
44
+                        uid: profile.profile_id,
45
+                        name: profile.user_name,
46
+                        avatar: profile.user_media,
47
+                    }
48
+                formattedList.push(formatted)
49
+            })
50
+            this.swipables = formattedList
51
+        },
52
+        // For Batch Data Parsing & Processing
36 53
         parseBatch(allBatches) {
37 54
             const finished = { profiles: [], users: [], responses: [] }
38 55
             allBatches.forEach(batch => {
@@ -47,9 +64,7 @@ export default {
47 64
             // console.log('parsed batch', finished)
48 65
             return finished
49 66
         },
50
-        processProfiles() {
51
-            const parsed = this.parseBatch([batch_10, batch_20, batch_30])
52
-            // const parsed = 
67
+        processProfilesFromBatch(parsed) {
53 68
             const findUser = profile => {
54 69
                 return parsed.users.filter(u => u.user_id == profile.user_id)[0]
55 70
             }

Loading…
Откажи
Сачувај