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:
@@ -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;
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user