aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/models/video/video.ts20
1 files changed, 15 insertions, 5 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 0d56f6ae9..3611eca89 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -203,7 +203,7 @@ enum ScopeNames {
203 [ScopeNames.WITH_FILES]: { 203 [ScopeNames.WITH_FILES]: {
204 include: [ 204 include: [
205 { 205 {
206 model: () => VideoFileModel, 206 model: () => VideoFileModel.unscoped(),
207 required: true 207 required: true
208 } 208 }
209 ] 209 ]
@@ -211,8 +211,7 @@ enum ScopeNames {
211 [ScopeNames.WITH_SHARES]: { 211 [ScopeNames.WITH_SHARES]: {
212 include: [ 212 include: [
213 { 213 {
214 model: () => VideoShareModel, 214 model: () => VideoShareModel.unscoped()
215 include: [ () => ActorModel ]
216 } 215 }
217 ] 216 ]
218 }, 217 },
@@ -220,14 +219,25 @@ enum ScopeNames {
220 include: [ 219 include: [
221 { 220 {
222 model: () => AccountVideoRateModel, 221 model: () => AccountVideoRateModel,
223 include: [ () => AccountModel ] 222 include: [
223 {
224 model: () => AccountModel.unscoped(),
225 required: true,
226 include: [
227 {
228 attributes: [ 'url' ],
229 model: () => ActorModel.unscoped()
230 }
231 ]
232 }
233 ]
224 } 234 }
225 ] 235 ]
226 }, 236 },
227 [ScopeNames.WITH_COMMENTS]: { 237 [ScopeNames.WITH_COMMENTS]: {
228 include: [ 238 include: [
229 { 239 {
230 model: () => VideoCommentModel 240 model: () => VideoCommentModel.unscoped()
231 } 241 }
232 ] 242 ]
233 } 243 }