aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/sql/videos-id-list-query-builder.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-11-02 11:00:40 +0100
committerChocobozzz <me@florianbigard.com>2021-11-02 11:13:13 +0100
commit7e7d8e485356402e7652c61c9f004e850b0a1607 (patch)
tree71c498c886cfd4b623a3c208572dc656ed800443 /server/models/video/sql/videos-id-list-query-builder.ts
parentfd5fa94bbc808e3ebb7a2e6bca636f2607566b52 (diff)
downloadPeerTube-7e7d8e485356402e7652c61c9f004e850b0a1607.tar.gz
PeerTube-7e7d8e485356402e7652c61c9f004e850b0a1607.tar.zst
PeerTube-7e7d8e485356402e7652c61c9f004e850b0a1607.zip
Some fixes for admin videos list
Diffstat (limited to 'server/models/video/sql/videos-id-list-query-builder.ts')
-rw-r--r--server/models/video/sql/videos-id-list-query-builder.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/models/video/sql/videos-id-list-query-builder.ts b/server/models/video/sql/videos-id-list-query-builder.ts
index 4d6e0ea4b..5064afafe 100644
--- a/server/models/video/sql/videos-id-list-query-builder.ts
+++ b/server/models/video/sql/videos-id-list-query-builder.ts
@@ -5,7 +5,7 @@ import { WEBSERVER } from '@server/initializers/constants'
5import { buildDirectionAndField, createSafeIn } from '@server/models/utils' 5import { buildDirectionAndField, createSafeIn } from '@server/models/utils'
6import { MUserAccountId, MUserId } from '@server/types/models' 6import { MUserAccountId, MUserId } from '@server/types/models'
7import { VideoInclude, VideoPrivacy, VideoState } from '@shared/models' 7import { VideoInclude, VideoPrivacy, VideoState } from '@shared/models'
8import { AbstractVideosQueryBuilder } from './shared/abstract-videos-query-builder' 8import { AbstractRunQuery } from './shared/abstract-run-query'
9 9
10/** 10/**
11 * 11 *
@@ -72,7 +72,7 @@ export type BuildVideosListQueryOptions = {
72 having?: string 72 having?: string
73} 73}
74 74
75export class VideosIdListQueryBuilder extends AbstractVideosQueryBuilder { 75export class VideosIdListQueryBuilder extends AbstractRunQuery {
76 protected replacements: any = {} 76 protected replacements: any = {}
77 77
78 private attributes: string[] 78 private attributes: string[]
@@ -105,7 +105,7 @@ export class VideosIdListQueryBuilder extends AbstractVideosQueryBuilder {
105 return this.runQuery().then(rows => rows.length !== 0 ? rows[0].total : 0) 105 return this.runQuery().then(rows => rows.length !== 0 ? rows[0].total : 0)
106 } 106 }
107 107
108 getIdsListQueryAndSort (options: BuildVideosListQueryOptions) { 108 getQuery (options: BuildVideosListQueryOptions) {
109 this.buildIdsListQuery(options) 109 this.buildIdsListQuery(options)
110 110
111 return { query: this.query, sort: this.sort, replacements: this.replacements } 111 return { query: this.query, sort: this.sort, replacements: this.replacements }