remove warn logs

This commit is contained in:
Hongbo Wu 2023-09-22 11:24:59 +08:00
parent 3b8b48bc21
commit 0912e7cf0f
3 changed files with 5 additions and 4 deletions

View file

@ -429,11 +429,11 @@ export const functionResolvers = {
// return await ctx.models.reaction.batchGetFromHighlight(id)
// },
async createdByMe(
highlight: { userId: string; createdByMe?: boolean },
highlight: { userId: string; createdByMe: boolean },
__: unknown,
ctx: WithDataSourcesContext
) {
return highlight.createdByMe ?? highlight.userId === ctx.uid
return highlight.createdByMe || highlight.userId === ctx.uid
},
},
// Reaction: {

View file

@ -42,7 +42,7 @@ const highlightDataToHighlight = (highlight: HighlightData): Highlight => ({
replies: [],
reactions: [],
type: highlight.highlightType,
createdByMe: true,
createdByMe: false,
user: {
...highlight.user,
sharedArticles: [],
@ -181,6 +181,7 @@ export const updateHighlightResolver = authorized<
annotation: input.annotation,
html: input.html,
quote: input.quote,
color: input.color,
},
uid,
pubsub

View file

@ -347,7 +347,7 @@ export function authRouter() {
const state = JSON.parse((req.query?.state || '') as string)
redirectUri = state?.redirect_uri
} catch (err) {
logger.warn(
logger.error(
'handleSuccessfulLogin: failed to parse redirect query state param',
err
)