From 2ec349aa857b0bd8f26de5cd78981d60c9b98a69 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 17 Aug 2022 14:52:23 +0200 Subject: Prefer using our pick function --- server/models/video/sql/video/video-model-get-query-builder.ts | 2 +- server/models/video/sql/video/videos-id-list-query-builder.ts | 5 ++++- server/models/video/sql/video/videos-model-list-query-builder.ts | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'server/models/video/sql') 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 @@ -import { pick } from 'lodash' import { Sequelize, Transaction } from 'sequelize' +import { pick } from '@shared/core-utils' import { AbstractVideoQueryBuilder } from './shared/abstract-video-query-builder' import { VideoFileQueryBuilder } from './shared/video-file-query-builder' 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 @@ -import { Sequelize } from 'sequelize' +import { Sequelize, Transaction } from 'sequelize' import validator from 'validator' import { exists } from '@server/helpers/custom-validators/misc' import { WEBSERVER } from '@server/initializers/constants' @@ -73,6 +73,9 @@ export type BuildVideosListQueryOptions = { group?: string having?: string + + transaction?: Transaction + logging?: boolean } 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 @@ -import { pick } from 'lodash' import { Sequelize } from 'sequelize' +import { pick } from '@shared/core-utils' import { VideoInclude } from '@shared/models' import { AbstractVideoQueryBuilder } from './shared/abstract-video-query-builder' import { VideoFileQueryBuilder } from './shared/video-file-query-builder' -- cgit v1.2.3