diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-09-04 21:45:05 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-09-04 21:45:05 +0200 |
commit | 980246ea8f1c51a137eaf0c441ef7e3b6fb88810 (patch) | |
tree | 0ce1339bc1d56a2dfd35935fe4f0303df8f75eca /server/lib/request | |
parent | 8221fef0f9d9b426fa498840d3f4fe2abfe19788 (diff) | |
download | PeerTube-980246ea8f1c51a137eaf0c441ef7e3b6fb88810.tar.gz PeerTube-980246ea8f1c51a137eaf0c441ef7e3b6fb88810.tar.zst PeerTube-980246ea8f1c51a137eaf0c441ef7e3b6fb88810.zip |
Make tslint happy
Diffstat (limited to 'server/lib/request')
-rw-r--r-- | server/lib/request/request-video-qadu-scheduler.ts | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/server/lib/request/request-video-qadu-scheduler.ts b/server/lib/request/request-video-qadu-scheduler.ts index afb9d5c23..d7e1d5e31 100644 --- a/server/lib/request/request-video-qadu-scheduler.ts +++ b/server/lib/request/request-video-qadu-scheduler.ts | |||
@@ -81,21 +81,21 @@ class RequestVideoQaduScheduler extends AbstractRequestScheduler<RequestsVideoQa | |||
81 | if (!videoData) videoData = { uuid: null } | 81 | if (!videoData) videoData = { uuid: null } |
82 | 82 | ||
83 | switch (request.type) { | 83 | switch (request.type) { |
84 | case REQUEST_VIDEO_QADU_TYPES.LIKES: | 84 | case REQUEST_VIDEO_QADU_TYPES.LIKES: |
85 | videoData.likes = video.likes | 85 | videoData.likes = video.likes |
86 | break | 86 | break |
87 | 87 | ||
88 | case REQUEST_VIDEO_QADU_TYPES.DISLIKES: | 88 | case REQUEST_VIDEO_QADU_TYPES.DISLIKES: |
89 | videoData.dislikes = video.dislikes | 89 | videoData.dislikes = video.dislikes |
90 | break | 90 | break |
91 | 91 | ||
92 | case REQUEST_VIDEO_QADU_TYPES.VIEWS: | 92 | case REQUEST_VIDEO_QADU_TYPES.VIEWS: |
93 | videoData.views = video.views | 93 | videoData.views = video.views |
94 | break | 94 | break |
95 | 95 | ||
96 | default: | 96 | default: |
97 | logger.error('Unknown request video QADU type %s.', request.type) | 97 | logger.error('Unknown request video QADU type %s.', request.type) |
98 | return | 98 | return |
99 | } | 99 | } |
100 | 100 | ||
101 | // Do not forget the uuid so the remote pod can identify the video | 101 | // Do not forget the uuid so the remote pod can identify the video |
@@ -103,12 +103,12 @@ class RequestVideoQaduScheduler extends AbstractRequestScheduler<RequestsVideoQa | |||
103 | requestsToMakeGrouped[hashKey].ids.push(request.id) | 103 | requestsToMakeGrouped[hashKey].ids.push(request.id) |
104 | 104 | ||
105 | // Maybe there are multiple quick and dirty update for the same video | 105 | // Maybe there are multiple quick and dirty update for the same video |
106 | // We use this hashmap to dedupe them | 106 | // We use this hash map to dedupe them |
107 | requestsToMakeGrouped[hashKey].videos[video.id] = videoData | 107 | requestsToMakeGrouped[hashKey].videos[video.id] = videoData |
108 | }) | 108 | }) |
109 | }) | 109 | }) |
110 | 110 | ||
111 | // Now we deduped similar quick and dirty updates, we can build our requests datas | 111 | // Now we deduped similar quick and dirty updates, we can build our requests data |
112 | Object.keys(requestsToMakeGrouped).forEach(hashKey => { | 112 | Object.keys(requestsToMakeGrouped).forEach(hashKey => { |
113 | Object.keys(requestsToMakeGrouped[hashKey].videos).forEach(videoUUID => { | 113 | Object.keys(requestsToMakeGrouped[hashKey].videos).forEach(videoUUID => { |
114 | const videoData = requestsToMakeGrouped[hashKey].videos[videoUUID] | 114 | const videoData = requestsToMakeGrouped[hashKey].videos[videoUUID] |
@@ -118,7 +118,7 @@ class RequestVideoQaduScheduler extends AbstractRequestScheduler<RequestsVideoQa | |||
118 | }) | 118 | }) |
119 | }) | 119 | }) |
120 | 120 | ||
121 | // We don't need it anymore, it was just to build our datas array | 121 | // We don't need it anymore, it was just to build our data array |
122 | delete requestsToMakeGrouped[hashKey].videos | 122 | delete requestsToMakeGrouped[hashKey].videos |
123 | }) | 123 | }) |
124 | 124 | ||