Skip to content

Commit 58570bd

Browse files
committed
Add special handling for Insurance field in Notion API to update corresponding Insurance link field.
1 parent d568cce commit 58570bd

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

devconnect/src/pages/api/notion/[...id].ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,11 @@ async function handlePatch(req: NextApiRequest, res: NextApiResponse, pageId: st
659659
// updates[propertyName] = { title: value ? [{ text: { content: value } }] : [] };
660660
// break;
661661
}
662+
663+
// Special handling for Insurance field - also update "Insurance link" field
664+
if (fieldName === 'Insurance' && value) {
665+
updates["Insurance link"] = { rich_text: value ? [{ text: { content: value } }] : [] }
666+
}
662667
}
663668

664669
await notion.pages.update({

0 commit comments

Comments
 (0)