mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
fix tests
This commit is contained in:
parent
86f4553dd1
commit
c1ba9b8017
3 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue