Video get SQL optimization

This commit is contained in:
Chocobozzz 2018-01-18 17:44:04 +01:00
parent 2c897999fe
commit 3e5002477a
No known key found for this signature in database
GPG Key ID: 583A612D890159BE

View File

@ -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
}
]