perf: allow get for notes/reactions

This commit is contained in:
syuilo 2022-07-05 19:16:21 +09:00 committed by Chloe Kudryavtsev
parent ac9ef2beba
commit ddab9eafee
2 changed files with 5 additions and 1 deletions

View file

@ -8,6 +8,9 @@ export const meta = {
requireCredential: false,
allowGet: true,
cacheSec: 60,
res: {
type: 'array',
optional: false, nullable: false,

View file

@ -70,10 +70,11 @@ onMounted(() => {
});
useTooltip(buttonRef, async (showing) => {
const reactions = await os.api('notes/reactions', {
const reactions = await os.apiGet('notes/reactions', {
noteId: props.note.id,
type: props.reaction,
limit: 11,
_cacheKey_: props.count,
});
const users = reactions.map(x => x.user);