refactor(frontend): os.tsに引き込んだscripts/api.tsの再exportをやめる (#12694)

* refactor(frontend): os.tsに引き込んだscripts/api.tsの再exportをやめる

* fix

* fix

* renate to "misskeyApi"

* rename file
This commit is contained in:
おさむのひと
2024-01-04 18:32:46 +09:00
committed by GitHub
parent ea41cc6ec0
commit fa9c4a19b9
191 changed files with 581 additions and 468 deletions

View File

@@ -29,6 +29,7 @@ import * as Misskey from 'misskey-js';
import XHeader from './_header_.vue';
import MkButton from '@/components/MkButton.vue';
import * as os from '@/os.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { i18n } from '@/i18n.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
@@ -41,7 +42,7 @@ async function addRelay() {
placeholder: i18n.ts.inboxUrl,
});
if (canceled) return;
os.api('admin/relays/add', {
misskeyApi('admin/relays/add', {
inbox,
}).then((relay: any) => {
refresh();
@@ -54,7 +55,7 @@ async function addRelay() {
}
function remove(inbox: string) {
os.api('admin/relays/remove', {
misskeyApi('admin/relays/remove', {
inbox,
}).then(() => {
refresh();
@@ -67,7 +68,7 @@ function remove(inbox: string) {
}
function refresh() {
os.api('admin/relays/list').then(relayList => {
misskeyApi('admin/relays/list').then(relayList => {
relays.value = relayList;
});
}