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