fix tests
This commit is contained in:
@ -9,7 +9,6 @@ import {
|
||||
OneToMany,
|
||||
OneToOne,
|
||||
PrimaryGeneratedColumn,
|
||||
Unique,
|
||||
UpdateDateColumn,
|
||||
} from 'typeorm'
|
||||
import { Highlight } from './highlight'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { DeepPartial } from 'typeorm'
|
||||
import { getColumnsDbName } from '.'
|
||||
import { getColumns, getColumnsDbName } from '.'
|
||||
import { appDataSource } from '../data_source'
|
||||
import { LibraryItem } from '../entity/library_item'
|
||||
import { keysToCamelCase, wordsCount } from '../utils/helpers'
|
||||
@ -53,7 +53,7 @@ export const libraryItemRepository = appDataSource
|
||||
.orUpdate(overwrites, conflictColumns, {
|
||||
skipUpdateIfNoValuesChanged: true,
|
||||
})
|
||||
.returning(columns)
|
||||
.returning(getColumns(this))
|
||||
.getQueryAndParameters()
|
||||
|
||||
// this is a workaround for the typeorm bug which quotes the md5 function
|
||||
|
||||
@ -1034,7 +1034,8 @@ export const deleteLibraryItems = async (
|
||||
userId?: string
|
||||
) => {
|
||||
return authTrx(
|
||||
async (tx) => tx.withRepository(libraryItemRepository).remove(items),
|
||||
async (tx) =>
|
||||
tx.withRepository(libraryItemRepository).delete(items.map((i) => i.id)),
|
||||
undefined,
|
||||
userId
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user