- const query: FindOptions = {
- offset: start,
- limit: count,
- order: getSortOnModel(sort.sortModel, sort.sortValue),
- include: [
- {
- model: VideoModel.scope(VideoModelScopeNames.WITH_THUMBNAILS),
- required: true,
- include: [
- {
- model: VideoChannelModel.scope({ method: [ VideoChannelScopeNames.SUMMARY, true ] }),
- required: true
- }
- ]
- }
- ]
+ function buildBaseQuery (): FindOptions {
+ return {
+ offset: start,
+ limit: count,
+ order: getBlacklistSort(sort.sortModel, sort.sortValue)
+ }