mirror of
https://github.com/jxpeng98/obsidian-to-NotionNext
synced 2026-07-29 08:08:34 +08:00
Next: use node-fetch to post notes for a better debug
This commit is contained in:
@@ -43,13 +43,15 @@ export async function uploadCommandNext(
|
||||
|
||||
if (markDownData) {
|
||||
const { basename } = nowFile;
|
||||
|
||||
const upload = new Upload2NotionNext(plugin, dbDetails);
|
||||
const res = await upload.syncMarkdownToNotionNext(basename, emoji, cover, tags, type, slug, stats, category, summary, paword, favicon, datetime, markDownData, nowFile, this.app);
|
||||
|
||||
if (res.status === 200) {
|
||||
const { response } = res;
|
||||
if (response.status === 200) {
|
||||
new Notice(`${i18nConfig["sync-preffix"]} ${basename} ${i18nConfig["sync-success"]}`).noticeEl.style.color = "green";
|
||||
} else {
|
||||
new Notice(`${i18nConfig["sync-fail"]}${basename}`, 5000);
|
||||
new Notice(`${i18nConfig["sync-fail"]} ${basename}`, 5000);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -83,7 +85,7 @@ export async function uploadCommandGeneral(
|
||||
if (res.status === 200) {
|
||||
new Notice(`${i18nConfig["sync-preffix"]} ${basename} ${i18nConfig["sync-success"]}`).noticeEl.style.color = "green";
|
||||
} else {
|
||||
new Notice(`${i18nConfig["sync-fail"]}${basename}`, 5000);
|
||||
new Notice(`${i18nConfig["sync-fail"]} ${basename}`, 5000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user