mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
fix: after successfully deleted highlights, still return error codes
This commit is contained in:
parent
caa5969940
commit
a4aeb40276
1 changed files with 5 additions and 2 deletions
|
|
@ -136,8 +136,11 @@ export const updateHighlight = async (
|
|||
export const deleteHighlightById = async (highlightId: string) => {
|
||||
return authTrx(async (tx) => {
|
||||
const highlightRepo = tx.withRepository(highlightRepository)
|
||||
const highlight = await highlightRepo.findOneByOrFail({
|
||||
id: highlightId,
|
||||
const highlight = await highlightRepo.findOneOrFail({
|
||||
where: { id: highlightId },
|
||||
relations: {
|
||||
user: true,
|
||||
},
|
||||
})
|
||||
|
||||
await highlightRepo.delete(highlightId)
|
||||
|
|
|
|||
Loading…
Reference in a new issue