mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
fix highlights api
This commit is contained in:
parent
5ed7e819e8
commit
d9d71aa443
2 changed files with 2 additions and 3 deletions
|
|
@ -31,7 +31,7 @@ export class Highlight {
|
|||
@JoinColumn({ name: 'user_id' })
|
||||
user!: User
|
||||
|
||||
@ManyToOne(() => LibraryItem, { onDelete: 'CASCADE' })
|
||||
@ManyToOne(() => LibraryItem, { onDelete: 'CASCADE', eager: true })
|
||||
@JoinColumn({ name: 'library_item_id' })
|
||||
libraryItem!: LibraryItem
|
||||
|
||||
|
|
|
|||
|
|
@ -100,8 +100,7 @@ export const deleteHighlightById = async (highlightId: string) => {
|
|||
throw new Error(`Highlight ${highlightId} not found`)
|
||||
}
|
||||
|
||||
await highlightRepo.remove(highlight)
|
||||
|
||||
await highlightRepo.delete(highlightId)
|
||||
return highlight
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue