mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Set HIGHLIGHT as default highlight type in every highlight
This commit is contained in:
parent
aae16d7a4d
commit
abb8df26e5
1 changed files with 4 additions and 5 deletions
|
|
@ -475,11 +475,7 @@ export const functionResolvers = {
|
|||
_: { input: ArticleHighlightsInput },
|
||||
ctx: WithDataSourcesContext
|
||||
) {
|
||||
const highlights = article.highlights?.map((h) => ({
|
||||
...h,
|
||||
type: h.type ?? HighlightType.Highlight,
|
||||
}))
|
||||
return highlights || []
|
||||
return article.highlights || []
|
||||
},
|
||||
async shareInfo(
|
||||
article: { id: string; sharedBy?: User; shareInfo?: LinkShareInfo },
|
||||
|
|
@ -538,6 +534,9 @@ export const functionResolvers = {
|
|||
) {
|
||||
return highlight.createdByMe ?? highlight.userId === ctx.claims?.uid
|
||||
},
|
||||
type(highlight: { type: HighlightType }) {
|
||||
return highlight.type || HighlightType.Highlight
|
||||
},
|
||||
},
|
||||
Reaction: {
|
||||
async user(
|
||||
|
|
|
|||
Loading…
Reference in a new issue