summaryrefslogtreecommitdiff
path: root/packages/frontend/src/cache.ts
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/cache.ts
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/cache.ts')
-rw-r--r--packages/frontend/src/cache.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/frontend/src/cache.ts b/packages/frontend/src/cache.ts
index 25d2b3c15f..20950add80 100644
--- a/packages/frontend/src/cache.ts
+++ b/packages/frontend/src/cache.ts
@@ -5,9 +5,9 @@
import * as Misskey from 'misskey-js';
import { Cache } from '@/scripts/cache.js';
-import { api } from '@/os.js';
+import { misskeyApi } from '@/scripts/misskey-api.js';
-export const clipsCache = new Cache<Misskey.entities.Clip[]>(1000 * 60 * 30, () => api('clips/list'));
-export const rolesCache = new Cache(1000 * 60 * 30, () => api('admin/roles/list'));
-export const userListsCache = new Cache<Misskey.entities.UserList[]>(1000 * 60 * 30, () => api('users/lists/list'));
-export const antennasCache = new Cache<Misskey.entities.Antenna[]>(1000 * 60 * 30, () => api('antennas/list'));
+export const clipsCache = new Cache<Misskey.entities.Clip[]>(1000 * 60 * 30, () => misskeyApi('clips/list'));
+export const rolesCache = new Cache(1000 * 60 * 30, () => misskeyApi('admin/roles/list'));
+export const userListsCache = new Cache<Misskey.entities.UserList[]>(1000 * 60 * 30, () => misskeyApi('users/lists/list'));
+export const antennasCache = new Cache<Misskey.entities.Antenna[]>(1000 * 60 * 30, () => misskeyApi('antennas/list'));