From 0937c8938c8821eade48d610ba8a9a2fce4cca62 Mon Sep 17 00:00:00 2001 From: Marie Date: Mon, 4 Nov 2024 18:06:38 +0100 Subject: [PATCH] upd: use apiWithDialog instead of misskeyApi --- packages/frontend/src/components/MkNoteSimple.vue | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/frontend/src/components/MkNoteSimple.vue b/packages/frontend/src/components/MkNoteSimple.vue index 6db95f1987..e7a357d1b6 100644 --- a/packages/frontend/src/components/MkNoteSimple.vue +++ b/packages/frontend/src/components/MkNoteSimple.vue @@ -34,7 +34,6 @@ import MkSubNoteContent from '@/components/MkSubNoteContent.vue'; import MkCwButton from '@/components/MkCwButton.vue'; import MkButton from '@/components/MkButton.vue'; import { defaultStore } from '@/store.js'; -import { misskeyApi } from '@/scripts/misskey-api.js'; import { i18n } from '@/i18n.js'; const props = defineProps<{ @@ -68,14 +67,10 @@ async function deleteScheduleNote() { } async function editScheduleNote() { - try { - await misskeyApi('notes/schedule/delete', { noteId: props.note.id }) - .then(() => { - isDeleted.value = true; - }); - } catch (err) { - console.error(err); - } + await os.apiWithDialog('notes/schedule/delete', { noteId: props.note.id }) + .then(() => { + isDeleted.value = true; + }); await os.post({ initialNote: props.note,