diff --git a/packages/frontend/src/components/MkCustomEmojiEditRequest.vue b/packages/frontend/src/components/MkCustomEmojiEditRequest.vue index e875155dec..cd970ac901 100644 --- a/packages/frontend/src/components/MkCustomEmojiEditRequest.vue +++ b/packages/frontend/src/components/MkCustomEmojiEditRequest.vue @@ -37,6 +37,7 @@ import MkPagination from '@/components/MkPagination.vue'; import * as os from '@/os'; import { i18n } from '@/i18n'; import MkButton from '@/components/MkButton.vue'; +import {misskeyApi} from "@/scripts/misskey-api.js"; const emojisRequestPaginationComponent = shallowRef>(); @@ -77,7 +78,7 @@ async function unrequested(emoji) { }); if (canceled) return; - await os.api('admin/emoji/update-request', { + await misskeyApi('admin/emoji/update-request', { id: emoji.id, fileId: emoji.fileId, name: emoji.name, @@ -100,7 +101,7 @@ async function deleteRequest(emoji) { }); if (canceled) return; - os.api('admin/emoji/delete', { + misskeyApi('admin/emoji/delete', { id: emoji.id, }).then(() => { emojisRequestPaginationComponent.value.removeItem((item) => item.id === emoji.id); diff --git a/packages/frontend/src/components/MkNoteSimple.vue b/packages/frontend/src/components/MkNoteSimple.vue index 49c681b3ee..9698c3f4a2 100644 --- a/packages/frontend/src/components/MkNoteSimple.vue +++ b/packages/frontend/src/components/MkNoteSimple.vue @@ -34,6 +34,7 @@ import MkSubNoteContent from '@/components/MkSubNoteContent.vue'; import MkCwButton from '@/components/MkCwButton.vue'; import MkButton from '@/components/MkButton.vue'; import * as os from '@/os.js'; +import {misskeyApi} from "@/scripts/misskey-api.js"; const isDeleted = ref(false); const props = defineProps<{ note: Misskey.entities.Note & { @@ -72,7 +73,7 @@ async function editScheduleNote() { if (canceled) return; - await os.api('notes/schedule/delete', { scheduledNoteId: props.note.scheduledNoteId }) + await misskeyApi('notes/schedule/delete', { scheduledNoteId: props.note.scheduledNoteId }) .then(() => { isDeleted.value = true; }); diff --git a/packages/frontend/src/pages/about.emojis.vue b/packages/frontend/src/pages/about.emojis.vue index b9855db474..4d48f92cc6 100644 --- a/packages/frontend/src/pages/about.emojis.vue +++ b/packages/frontend/src/pages/about.emojis.vue @@ -53,7 +53,6 @@ import MkInput from '@/components/MkInput.vue'; import MkFoldableSection from '@/components/MkFoldableSection.vue'; import { customEmojis, customEmojiCategories } from '@/custom-emojis.js'; import { i18n } from '@/i18n.js'; -import * as os from '@/os'; import { $i } from '@/account.js'; import { definePageMetadata } from '@/scripts/page-metadata'; import { misskeyApiGet } from '@/scripts/misskey-api.js'; diff --git a/packages/frontend/src/pages/avatar-decorations.vue b/packages/frontend/src/pages/avatar-decorations.vue index 4c0e0bfa74..e81621f265 100644 --- a/packages/frontend/src/pages/avatar-decorations.vue +++ b/packages/frontend/src/pages/avatar-decorations.vue @@ -97,7 +97,7 @@ async function setCategoryBulk() { if (selectItemsId.value.length > 1) { for (let i = 0; i < selectItemsId.value.length; i++) { let decorationId = selectItemsId.value[i]; - await os.api('admin/avatar-decorations/update', { + await misskeyApi('admin/avatar-decorations/update', { id: decorationId, category: result, });