Skip to content

Commit

Permalink
Merge pull request #19 from kkdai/fix_title_not_in_db
Browse files Browse the repository at this point in the history
Fix properties in AddPageToDatabase function
  • Loading branch information
kkdai authored Jan 25, 2024
2 parents ef5a676 + a113ebb commit f21eeba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions notion.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,16 @@ func (n *NotionDB) AddPageToDatabase(name string, title string, address string,

// 建立 Properties 物件來設置頁面屬性
properties := notionapi.Properties{
"UID": notionapi.RichTextProperty{
RichText: []notionapi.RichText{
"UID": notionapi.TitleProperty{
Title: []notionapi.RichText{
{
PlainText: name,
Text: &notionapi.Text{Content: n.UID},
},
},
},
"Name": notionapi.TitleProperty{
Title: []notionapi.RichText{
"Name": notionapi.RichTextProperty{
RichText: []notionapi.RichText{
{
PlainText: name,
Text: &notionapi.Text{Content: name},
Expand Down

0 comments on commit f21eeba

Please sign in to comment.