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

:recycle: moving match queue save -> AFTER check for scoredProfiles

tags/0.0.1
J 4 лет назад
Родитель
Сommit
9c10fff178
1 измененных файлов: 4 добавлений и 5 удалений
  1. 4
    5
      backend/lib/routes/profile/score.js

+ 4
- 5
backend/lib/routes/profile/score.js Просмотреть файл

@@ -60,15 +60,14 @@ module.exports = {
60 60
                 distanceUnit,
61 61
             )
62 62
 
63
-            await matchQueueService.saveMatchQueue(
64
-                profileId,
65
-                scoredProfiles.map(profile => profile.profile_id),
66
-            )
67 63
             try {
68 64
                 if (!scoredProfiles) {
69 65
                     throw new RangeError('Unable to score profiles')
70 66
                 }
71
-
67
+                await matchQueueService.saveMatchQueue(
68
+                    profileId,
69
+                    scoredProfiles.map(profile => profile.profile_id),
70
+                )
72 71
                 return h
73 72
                     .response({
74 73
                         ok: true,

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