diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-17 14:52:23 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-17 14:54:01 +0200 |
commit | 2ec349aa857b0bd8f26de5cd78981d60c9b98a69 (patch) | |
tree | c48e4957d0abb778ee5eaa2474c24a9c88f69260 /server/models/video/sql | |
parent | 396f6f0140b0f76162e2378fd5a61e2f888673ed (diff) | |
download | PeerTube-2ec349aa857b0bd8f26de5cd78981d60c9b98a69.tar.gz PeerTube-2ec349aa857b0bd8f26de5cd78981d60c9b98a69.tar.zst PeerTube-2ec349aa857b0bd8f26de5cd78981d60c9b98a69.zip |
Prefer using our pick function
Diffstat (limited to 'server/models/video/sql')
3 files changed, 6 insertions, 3 deletions
diff --git a/server/models/video/sql/video/video-model-get-query-builder.ts b/server/models/video/sql/video/video-model-get-query-builder.ts index 29e59c8be..8e90ff641 100644 --- a/server/models/video/sql/video/video-model-get-query-builder.ts +++ b/server/models/video/sql/video/video-model-get-query-builder.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { pick } from 'lodash' | ||
2 | import { Sequelize, Transaction } from 'sequelize' | 1 | import { Sequelize, Transaction } from 'sequelize' |
2 | import { pick } from '@shared/core-utils' | ||
3 | import { AbstractVideoQueryBuilder } from './shared/abstract-video-query-builder' | 3 | import { AbstractVideoQueryBuilder } from './shared/abstract-video-query-builder' |
4 | import { VideoFileQueryBuilder } from './shared/video-file-query-builder' | 4 | import { VideoFileQueryBuilder } from './shared/video-file-query-builder' |
5 | import { VideoModelBuilder } from './shared/video-model-builder' | 5 | import { VideoModelBuilder } from './shared/video-model-builder' |
diff --git a/server/models/video/sql/video/videos-id-list-query-builder.ts b/server/models/video/sql/video/videos-id-list-query-builder.ts index 8692a436a..14f903851 100644 --- a/server/models/video/sql/video/videos-id-list-query-builder.ts +++ b/server/models/video/sql/video/videos-id-list-query-builder.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Sequelize } from 'sequelize' | 1 | import { Sequelize, Transaction } from 'sequelize' |
2 | import validator from 'validator' | 2 | import validator from 'validator' |
3 | import { exists } from '@server/helpers/custom-validators/misc' | 3 | import { exists } from '@server/helpers/custom-validators/misc' |
4 | import { WEBSERVER } from '@server/initializers/constants' | 4 | import { WEBSERVER } from '@server/initializers/constants' |
@@ -73,6 +73,9 @@ export type BuildVideosListQueryOptions = { | |||
73 | 73 | ||
74 | group?: string | 74 | group?: string |
75 | having?: string | 75 | having?: string |
76 | |||
77 | transaction?: Transaction | ||
78 | logging?: boolean | ||
76 | } | 79 | } |
77 | 80 | ||
78 | export class VideosIdListQueryBuilder extends AbstractRunQuery { | 81 | export class VideosIdListQueryBuilder extends AbstractRunQuery { |
diff --git a/server/models/video/sql/video/videos-model-list-query-builder.ts b/server/models/video/sql/video/videos-model-list-query-builder.ts index 4fe6bc321..3fdac4ed3 100644 --- a/server/models/video/sql/video/videos-model-list-query-builder.ts +++ b/server/models/video/sql/video/videos-model-list-query-builder.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { pick } from 'lodash' | ||
2 | import { Sequelize } from 'sequelize' | 1 | import { Sequelize } from 'sequelize' |
2 | import { pick } from '@shared/core-utils' | ||
3 | import { VideoInclude } from '@shared/models' | 3 | import { VideoInclude } from '@shared/models' |
4 | import { AbstractVideoQueryBuilder } from './shared/abstract-video-query-builder' | 4 | import { AbstractVideoQueryBuilder } from './shared/abstract-video-query-builder' |
5 | import { VideoFileQueryBuilder } from './shared/video-file-query-builder' | 5 | import { VideoFileQueryBuilder } from './shared/video-file-query-builder' |