import { values } from 'lodash'
import { NSFW_POLICY_TYPES } from '../../initializers'
+enum ScopeNames {
+ WITH_VIDEO_CHANNEL = 'WITH_VIDEO_CHANNEL'
+}
+
@DefaultScope({
include: [
{
]
})
@Scopes({
- withVideoChannel: {
+ [ScopeNames.WITH_VIDEO_CHANNEL]: {
include: [
{
model: () => AccountModel,
}
}
- return UserModel.scope('withVideoChannel').findOne(query)
+ return UserModel.scope(ScopeNames.WITH_VIDEO_CHANNEL).findOne(query)
}
static loadByEmail (email: string) {