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

@@ -5,7 +5,7 @@
import { shallowRef, computed, markRaw, watch } from 'vue';
import * as Misskey from 'misskey-js';
import { api, apiGet } from '@/os.js';
import { misskeyApi, misskeyApiGet } from '@/scripts/misskey-api.js';
import { useStream } from '@/stream.js';
import { get, set } from '@/scripts/idb-proxy.js';
@@ -52,11 +52,11 @@ export async function fetchCustomEmojis(force = false) {
let res;
if (force) {
res = await api('emojis', {});
res = await misskeyApi('emojis', {});
} else {
const lastFetchedAt = await get('lastEmojisFetchedAt');
if (lastFetchedAt && (now - lastFetchedAt) < 1000 * 60 * 60) return;
res = await apiGet('emojis', {});
res = await misskeyApiGet('emojis', {});
}
customEmojis.value = res.emojis;