Improve SQL request for video AP request
This commit is contained in:
parent
1869c87535
commit
e53f952eba
|
@ -203,7 +203,7 @@ enum ScopeNames {
|
||||||
[ScopeNames.WITH_FILES]: {
|
[ScopeNames.WITH_FILES]: {
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
model: () => VideoFileModel,
|
model: () => VideoFileModel.unscoped(),
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -211,8 +211,7 @@ enum ScopeNames {
|
||||||
[ScopeNames.WITH_SHARES]: {
|
[ScopeNames.WITH_SHARES]: {
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
model: () => VideoShareModel,
|
model: () => VideoShareModel.unscoped()
|
||||||
include: [ () => ActorModel ]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -220,14 +219,25 @@ enum ScopeNames {
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
model: () => AccountVideoRateModel,
|
model: () => AccountVideoRateModel,
|
||||||
include: [ () => AccountModel ]
|
include: [
|
||||||
|
{
|
||||||
|
model: () => AccountModel.unscoped(),
|
||||||
|
required: true,
|
||||||
|
include: [
|
||||||
|
{
|
||||||
|
attributes: [ 'url' ],
|
||||||
|
model: () => ActorModel.unscoped()
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
[ScopeNames.WITH_COMMENTS]: {
|
[ScopeNames.WITH_COMMENTS]: {
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
model: () => VideoCommentModel
|
model: () => VideoCommentModel.unscoped()
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue