upd: use apiWithDialog instead of misskeyApi

This commit is contained in:
Marie 2024-11-04 18:06:38 +01:00
parent e0bdede4ca
commit 0937c8938c
No known key found for this signature in database
GPG Key ID: 7ADF6C9CD9A28555
1 changed files with 4 additions and 9 deletions

View File

@ -34,7 +34,6 @@ import MkSubNoteContent from '@/components/MkSubNoteContent.vue';
import MkCwButton from '@/components/MkCwButton.vue'; import MkCwButton from '@/components/MkCwButton.vue';
import MkButton from '@/components/MkButton.vue'; import MkButton from '@/components/MkButton.vue';
import { defaultStore } from '@/store.js'; import { defaultStore } from '@/store.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { i18n } from '@/i18n.js'; import { i18n } from '@/i18n.js';
const props = defineProps<{ const props = defineProps<{
@ -68,14 +67,10 @@ async function deleteScheduleNote() {
} }
async function editScheduleNote() { async function editScheduleNote() {
try { await os.apiWithDialog('notes/schedule/delete', { noteId: props.note.id })
await misskeyApi('notes/schedule/delete', { noteId: props.note.id })
.then(() => { .then(() => {
isDeleted.value = true; isDeleted.value = true;
}); });
} catch (err) {
console.error(err);
}
await os.post({ await os.post({
initialNote: props.note, initialNote: props.note,