summaryrefslogtreecommitdiff
path: root/packages/frontend/src/pages/api-console.vue
diff options
context:
space:
mode:
authorおさむのひと <46447427+samunohito@users.noreply.github.com>2024-01-04 18:32:46 +0900
committerGitHub <noreply@github.com>2024-01-04 18:32:46 +0900
commitfa9c4a19b98167c7552bec8f4d791bd89db8fbbe (patch)
treeb889429cd20a5160de818ee61c2dcd9066e2c14b /packages/frontend/src/pages/api-console.vue
parentrefactor(frontend): reduce type errors (diff)
downloadsharkey-fa9c4a19b98167c7552bec8f4d791bd89db8fbbe.tar.gz
sharkey-fa9c4a19b98167c7552bec8f4d791bd89db8fbbe.tar.bz2
sharkey-fa9c4a19b98167c7552bec8f4d791bd89db8fbbe.zip
refactor(frontend): os.tsに引き込んだscripts/api.tsの再exportをやめる (#12694)
* refactor(frontend): os.tsに引き込んだscripts/api.tsの再exportをやめる * fix * fix * renate to "misskeyApi" * rename file
Diffstat (limited to 'packages/frontend/src/pages/api-console.vue')
-rw-r--r--packages/frontend/src/pages/api-console.vue8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/frontend/src/pages/api-console.vue b/packages/frontend/src/pages/api-console.vue
index 0cd4a8dae8..6456965499 100644
--- a/packages/frontend/src/pages/api-console.vue
+++ b/packages/frontend/src/pages/api-console.vue
@@ -41,7 +41,7 @@ import MkButton from '@/components/MkButton.vue';
import MkInput from '@/components/MkInput.vue';
import MkTextarea from '@/components/MkTextarea.vue';
import MkSwitch from '@/components/MkSwitch.vue';
-import * as os from '@/os.js';
+import { misskeyApi } from '@/scripts/misskey-api.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
const body = ref('{}');
@@ -51,14 +51,14 @@ const sending = ref(false);
const res = ref('');
const withCredential = ref(true);
-os.api('endpoints').then(endpointResponse => {
+misskeyApi('endpoints').then(endpointResponse => {
endpoints.value = endpointResponse;
});
function send() {
sending.value = true;
const requestBody = JSON5.parse(body.value);
- os.api(endpoint.value as keyof Endpoints, requestBody, requestBody.i || (withCredential.value ? undefined : null)).then(resp => {
+ misskeyApi(endpoint.value as keyof Endpoints, requestBody, requestBody.i || (withCredential.value ? undefined : null)).then(resp => {
sending.value = false;
res.value = JSON5.stringify(resp, null, 2);
}, err => {
@@ -68,7 +68,7 @@ function send() {
}
function onEndpointChange() {
- os.api('endpoint', { endpoint: endpoint.value }, withCredential.value ? undefined : null).then(resp => {
+ misskeyApi('endpoint', { endpoint: endpoint.value }, withCredential.value ? undefined : null).then(resp => {
const endpointBody = {};
for (const p of resp.params) {
endpointBody[p.name] =