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:
おさむのひと 2024-01-04 18:32:46 +09:00 committed by GitHub
parent ea41cc6ec0
commit fa9c4a19b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
191 changed files with 581 additions and 468 deletions

View file

@ -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,