mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-11-23 00:09:08 +01:00
1時間に
This commit is contained in:
parent
8a6750278e
commit
0cffe60abc
2 changed files with 3 additions and 3 deletions
|
@ -11,7 +11,7 @@ export const meta = {
|
|||
|
||||
requireCredential: false,
|
||||
allowGet: true,
|
||||
cacheSec: 60,
|
||||
cacheSec: 3600,
|
||||
|
||||
res: {
|
||||
type: 'object',
|
||||
|
@ -77,7 +77,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||
},
|
||||
cache: {
|
||||
id: 'meta_emojis',
|
||||
milliseconds: 60000, // 1 minute
|
||||
milliseconds: 3600000, // 1 hour
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ stream.on('emojiDeleted', emojiData => {
|
|||
export async function fetchCustomEmojis() {
|
||||
const now = Date.now();
|
||||
const lastFetchedAt = miLocalStorage.getItem('lastEmojisFetchedAt');
|
||||
if (lastFetchedAt && (now - parseInt(lastFetchedAt)) < 1000 * 60) return;
|
||||
if (lastFetchedAt && (now - parseInt(lastFetchedAt)) < 1000 * 60 * 60) return;
|
||||
|
||||
const res = await apiGet('emojis', {});
|
||||
|
||||
|
|
Loading…
Reference in a new issue