diff options
| author | おさむのひと <46447427+samunohito@users.noreply.github.com> | 2024-01-04 18:32:46 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-04 18:32:46 +0900 |
| commit | fa9c4a19b98167c7552bec8f4d791bd89db8fbbe (patch) | |
| tree | b889429cd20a5160de818ee61c2dcd9066e2c14b /packages/frontend/src/components/MkReactionsViewer.reaction.vue | |
| parent | refactor(frontend): reduce type errors (diff) | |
| download | misskey-fa9c4a19b98167c7552bec8f4d791bd89db8fbbe.tar.gz misskey-fa9c4a19b98167c7552bec8f4d791bd89db8fbbe.tar.bz2 misskey-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/components/MkReactionsViewer.reaction.vue')
| -rw-r--r-- | packages/frontend/src/components/MkReactionsViewer.reaction.vue | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/frontend/src/components/MkReactionsViewer.reaction.vue b/packages/frontend/src/components/MkReactionsViewer.reaction.vue index 250b7b96d5..2e75f444da 100644 --- a/packages/frontend/src/components/MkReactionsViewer.reaction.vue +++ b/packages/frontend/src/components/MkReactionsViewer.reaction.vue @@ -22,6 +22,7 @@ import * as Misskey from 'misskey-js'; import XDetails from '@/components/MkReactionsViewer.details.vue'; import MkReactionIcon from '@/components/MkReactionIcon.vue'; import * as os from '@/os.js'; +import { misskeyApi, misskeyApiGet } from '@/scripts/misskey-api.js'; import { useTooltip } from '@/scripts/use-tooltip.js'; import { $i } from '@/account.js'; import MkReactionEffect from '@/components/MkReactionEffect.vue'; @@ -69,11 +70,11 @@ async function toggleReaction() { return; } - os.api('notes/reactions/delete', { + misskeyApi('notes/reactions/delete', { noteId: props.note.id, }).then(() => { if (oldReaction !== props.reaction) { - os.api('notes/reactions/create', { + misskeyApi('notes/reactions/create', { noteId: props.note.id, reaction: props.reaction, }); @@ -87,7 +88,7 @@ async function toggleReaction() { return; } - os.api('notes/reactions/create', { + misskeyApi('notes/reactions/create', { noteId: props.note.id, reaction: props.reaction, }); @@ -117,7 +118,7 @@ onMounted(() => { if (!mock) { useTooltip(buttonEl, async (showing) => { - const reactions = await os.apiGet('notes/reactions', { + const reactions = await misskeyApiGet('notes/reactions', { noteId: props.note.id, type: props.reaction, limit: 10, |