mirror of https://github.com/Chocobozzz/PeerTube
Video get SQL optimization
parent
2c897999fe
commit
3e5002477a
|
@ -127,22 +127,30 @@ enum ScopeNames {
|
|||
attributes: {
|
||||
exclude: [ 'privateKey', 'publicKey' ]
|
||||
},
|
||||
model: () => ActorModel,
|
||||
required: true
|
||||
},
|
||||
{
|
||||
model: () => AccountModel,
|
||||
model: () => ActorModel.unscoped(),
|
||||
required: true,
|
||||
include: [
|
||||
{
|
||||
model: () => ActorModel,
|
||||
attributes: [ 'host' ],
|
||||
model: () => ServerModel.unscoped(),
|
||||
required: false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
model: () => AccountModel.unscoped(),
|
||||
required: true,
|
||||
include: [
|
||||
{
|
||||
model: () => ActorModel.unscoped(),
|
||||
attributes: {
|
||||
exclude: [ 'privateKey', 'publicKey' ]
|
||||
},
|
||||
required: true,
|
||||
include: [
|
||||
{
|
||||
model: () => ServerModel,
|
||||
attributes: [ 'host' ],
|
||||
model: () => ServerModel.unscoped(),
|
||||
required: false
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue