type?: VideoPlaylistType
accountId?: number
videoChannelId?: number
- listMyPlaylists?: boolean,
+ listMyPlaylists?: boolean
search?: string
}
@Scopes(() => ({
- [ ScopeNames.WITH_THUMBNAIL ]: {
+ [ScopeNames.WITH_THUMBNAIL]: {
include: [
{
model: ThumbnailModel,
}
]
},
- [ ScopeNames.WITH_VIDEOS_LENGTH ]: {
+ [ScopeNames.WITH_VIDEOS_LENGTH]: {
attributes: {
include: [
[
]
}
} as FindOptions,
- [ ScopeNames.WITH_ACCOUNT ]: {
+ [ScopeNames.WITH_ACCOUNT]: {
include: [
{
model: AccountModel,
}
]
},
- [ ScopeNames.WITH_ACCOUNT_AND_CHANNEL_SUMMARY ]: {
+ [ScopeNames.WITH_ACCOUNT_AND_CHANNEL_SUMMARY]: {
include: [
{
model: AccountModel.scope(AccountScopeNames.SUMMARY),
}
]
},
- [ ScopeNames.WITH_ACCOUNT_AND_CHANNEL ]: {
+ [ScopeNames.WITH_ACCOUNT_AND_CHANNEL]: {
include: [
{
model: AccountModel,
}
]
},
- [ ScopeNames.AVAILABLE_FOR_LIST ]: (options: AvailableForListOptions) => {
+ [ScopeNames.AVAILABLE_FOR_LIST]: (options: AvailableForListOptions) => {
let whereActor: WhereOptions = {}
const inQueryInstanceFollow = buildServerIdsFollowedBy(options.followerActorId)
whereActor = {
- [ Op.or ]: [
+ [Op.or]: [
{
serverId: null
},
{
serverId: {
- [ Op.in ]: literal(inQueryInstanceFollow)
+ [Op.in]: literal(inQueryInstanceFollow)
}
}
]
if (options.search) {
whereAnd.push({
name: {
- [ Op.iLike ]: '%' + options.search + '%'
+ [Op.iLike]: '%' + options.search + '%'
}
})
}
static listForApi (options: {
followerActorId: number
- start: number,
- count: number,
- sort: string,
- type?: VideoPlaylistType,
- accountId?: number,
- videoChannelId?: number,
- listMyPlaylists?: boolean,
+ start: number
+ count: number
+ sort: string
+ type?: VideoPlaylistType
+ accountId?: number
+ videoChannelId?: number
+ listMyPlaylists?: boolean
search?: string
}) {
const query = {