diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/models/request/request-video-event.ts | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/server/models/request/request-video-event.ts b/server/models/request/request-video-event.ts index 34d5c7162..d7dce9bc8 100644 --- a/server/models/request/request-video-event.ts +++ b/server/models/request/request-video-event.ts | |||
@@ -102,15 +102,20 @@ listWithLimitAndRandom = function (limitPods: number, limitRequestsPerPod: numbe | |||
102 | model: RequestVideoEvent['sequelize'].models.Video, | 102 | model: RequestVideoEvent['sequelize'].models.Video, |
103 | include: [ | 103 | include: [ |
104 | { | 104 | { |
105 | model: RequestVideoEvent['sequelize'].models.Author, | 105 | model: RequestVideoEvent['sequelize'].models.VideoChannel, |
106 | include: [ | 106 | include: [ |
107 | { | 107 | { |
108 | model: RequestVideoEvent['sequelize'].models.Pod, | 108 | model: RequestVideoEvent['sequelize'].models.Author, |
109 | where: { | 109 | include: [ |
110 | id: { | 110 | { |
111 | $in: podIds | 111 | model: RequestVideoEvent['sequelize'].models.Pod, |
112 | where: { | ||
113 | id: { | ||
114 | $in: podIds | ||
115 | } | ||
116 | } | ||
112 | } | 117 | } |
113 | } | 118 | ] |
114 | } | 119 | } |
115 | ] | 120 | ] |
116 | } | 121 | } |
@@ -138,10 +143,15 @@ removeByRequestIdsAndPod = function (ids: number[], podId: number) { | |||
138 | model: RequestVideoEvent['sequelize'].models.Video, | 143 | model: RequestVideoEvent['sequelize'].models.Video, |
139 | include: [ | 144 | include: [ |
140 | { | 145 | { |
141 | model: RequestVideoEvent['sequelize'].models.Author, | 146 | model: RequestVideoEvent['sequelize'].models.VideoChannel, |
142 | where: { | 147 | include: [ |
143 | podId | 148 | { |
144 | } | 149 | model: RequestVideoEvent['sequelize'].models.Author, |
150 | where: { | ||
151 | podId | ||
152 | } | ||
153 | } | ||
154 | ] | ||
145 | } | 155 | } |
146 | ] | 156 | ] |
147 | } | 157 | } |