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:
@@ -49,7 +49,8 @@ import { defineAsyncComponent, ref } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { swInject } from './sw-inject.js';
|
||||
import XNotification from './notification.vue';
|
||||
import { popups, pendingApiRequestsCount } from '@/os.js';
|
||||
import { popups } from '@/os.js';
|
||||
import { pendingApiRequestsCount } from '@/scripts/misskey-api.js';
|
||||
import { uploads } from '@/scripts/upload.js';
|
||||
import * as sound from '@/scripts/sound.js';
|
||||
import { $i } from '@/account.js';
|
||||
|
||||
@@ -34,7 +34,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
import { ref } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MarqueeText from '@/components/MkMarquee.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { useInterval } from '@/scripts/use-interval.js';
|
||||
import { getProxiedImageUrlNullable } from '@/scripts/media-proxy.js';
|
||||
|
||||
@@ -52,7 +52,7 @@ const fetching = ref(true);
|
||||
const key = ref(0);
|
||||
|
||||
const tick = () => {
|
||||
os.api('federation/instances', {
|
||||
misskeyApi('federation/instances', {
|
||||
sort: '+latestRequestReceivedAt',
|
||||
limit: 30,
|
||||
}).then(res => {
|
||||
|
||||
@@ -34,7 +34,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
import { ref, watch } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MarqueeText from '@/components/MkMarquee.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { useInterval } from '@/scripts/use-interval.js';
|
||||
import { getNoteSummary } from '@/scripts/get-note-summary.js';
|
||||
import { notePage } from '@/filters/note.js';
|
||||
@@ -54,7 +54,7 @@ const key = ref(0);
|
||||
|
||||
const tick = () => {
|
||||
if (props.userListId == null) return;
|
||||
os.api('notes/user-list-timeline', {
|
||||
misskeyApi('notes/user-list-timeline', {
|
||||
listId: props.userListId,
|
||||
}).then(res => {
|
||||
notes.value = res;
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { api, post } from '@/os.js';
|
||||
import { post } from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { $i, login } from '@/account.js';
|
||||
import { getAccountFromId } from '@/scripts/get-account-from-id.js';
|
||||
import { mainRouter } from '@/router.js';
|
||||
@@ -30,10 +31,10 @@ export function swInject() {
|
||||
// プッシュ通知から来たreply,renoteはtruncateBodyが通されているため、
|
||||
// 完全なノートを取得しなおす
|
||||
if (props.reply) {
|
||||
props.reply = await api('notes/show', { noteId: props.reply.id });
|
||||
props.reply = await misskeyApi('notes/show', { noteId: props.reply.id });
|
||||
}
|
||||
if (props.renote) {
|
||||
props.renote = await api('notes/show', { noteId: props.renote.id });
|
||||
props.renote = await misskeyApi('notes/show', { noteId: props.renote.id });
|
||||
}
|
||||
return post(props);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user