import { AccountBlock } from '../../../shared/models'
import { ActorModel } from '../actor/actor'
import { ServerModel } from '../server/server'
-import { createSafeIn, getSort, searchAttribute } from '../utils'
+import { createSafeIn, getSort, searchAttribute } from '../shared'
import { AccountModel } from './account'
@Table({
as: 'BlockedAccount'
}
]
+ } else if (search) { // We need some joins when counting with search
+ query.include = [
+ {
+ model: AccountModel.unscoped(),
+ required: true,
+ as: 'BlockedAccount',
+ include: [
+ {
+ model: ActorModel.unscoped(),
+ required: true
+ }
+ ]
+ }
+ ]
}
return query