load labels when getting item

This commit is contained in:
Hongbo Wu
2024-04-28 14:25:11 +08:00
parent 89d6564d74
commit 7ef6973a47
2 changed files with 3 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import {
OneToMany,
OneToOne,
PrimaryGeneratedColumn,
Unique,
UpdateDateColumn,
} from 'typeorm'
import { Highlight } from './highlight'

View File

@ -88,7 +88,6 @@ import {
setFileUploadComplete,
} from '../../services/upload_file'
import { traceAs } from '../../tracing'
import { Merge } from '../../util'
import { analytics } from '../../utils/analytics'
import { isSiteBlockedForParse } from '../../utils/blocked'
import { enqueueBulkAction } from '../../utils/createTask'
@ -393,10 +392,12 @@ export const getArticleResolver = authorized<
tx.withRepository(libraryItemRepository).findOne({
select: selectColumns,
where: {
user: { id: uid },
...where,
deletedAt: IsNull(),
},
relations: {
labels: true,
highlights: {
user: true,
labels: true,