Skip to content

Commit

Permalink
Merge branch 'makenotion:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
MohammedEsafi authored Feb 4, 2024
2 parents 069ae27 + b66c67d commit cedc393
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/web-form-with-express/public/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ const appendApiResponse = function (apiResponse, el) {

// Add success message to UI
const newParagraphSuccessMsg = document.createElement("p")
newParagraphSuccessMsg.innerHTML = "Result: " + apiResponse.message
newParagraphSuccessMsg.textContent = "Result: " + apiResponse.message
el.appendChild(newParagraphSuccessMsg)
// See browser console for more information
if (apiResponse.message === "error") return

// Add ID of Notion item (db, page, comment) to UI
const newParagraphId = document.createElement("p")
newParagraphId.innerHTML = "ID: " + apiResponse.data.id
newParagraphId.textContent = "ID: " + apiResponse.data.id
el.appendChild(newParagraphId)

// Add URL of Notion item (db, page) to UI
Expand All @@ -51,12 +51,12 @@ const appendBlocksResponse = function (apiResponse, el) {

// Add success message to UI
const newParagraphSuccessMsg = document.createElement("p")
newParagraphSuccessMsg.innerHTML = "Result: " + apiResponse.message
newParagraphSuccessMsg.textContent = "Result: " + apiResponse.message
el.appendChild(newParagraphSuccessMsg)

// Add block ID to UI
const newParagraphId = document.createElement("p")
newParagraphId.innerHTML = "ID: " + apiResponse.data.results[0].id
newParagraphId.textContent = "ID: " + apiResponse.data.results[0].id
el.appendChild(newParagraphId)
}

Expand Down

0 comments on commit cedc393

Please sign in to comment.