Update custom function and adjust the custom interface ui

This commit is contained in:
Jiaxin Peng
2024-07-02 23:48:37 +01:00
parent a8ebab7fcb
commit 5799ffe79b
4 changed files with 100 additions and 214 deletions

View File

@@ -71,6 +71,8 @@ export class Upload2NotionCustom extends UploadBaseCustom {
};
}
console.log(bodyString)
try {
return await requestUrl({
url: `https://api.notion.com/v1/pages`,
@@ -218,11 +220,15 @@ export class Upload2NotionCustom extends UploadBaseCustom {
const properties: { [key: string]: any } = {};
// Only include custom properties that have values
customProperties.forEach(({customName, customType}) => {
if (customValues[customName] !== undefined) {
properties[customName] = this.buildPropertyObject(customName, customType, customValues);
}
}
);
console.log(properties)
return {
parent: {