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/scripts/get-drive-file-menu.ts | |
| parent | refactor(frontend): reduce type errors (diff) | |
| download | sharkey-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/scripts/get-drive-file-menu.ts')
| -rw-r--r-- | packages/frontend/src/scripts/get-drive-file-menu.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/frontend/src/scripts/get-drive-file-menu.ts b/packages/frontend/src/scripts/get-drive-file-menu.ts index f8496f0711..59c46c2cbc 100644 --- a/packages/frontend/src/scripts/get-drive-file-menu.ts +++ b/packages/frontend/src/scripts/get-drive-file-menu.ts @@ -8,6 +8,7 @@ import { defineAsyncComponent } from 'vue'; import { i18n } from '@/i18n.js'; import copyToClipboard from '@/scripts/copy-to-clipboard.js'; import * as os from '@/os.js'; +import { misskeyApi } from '@/scripts/misskey-api.js'; import { MenuItem } from '@/types/menu.js'; import { defaultStore } from '@/store.js'; @@ -18,7 +19,7 @@ function rename(file: Misskey.entities.DriveFile) { default: file.name, }).then(({ canceled, result: name }) => { if (canceled) return; - os.api('drive/files/update', { + misskeyApi('drive/files/update', { fileId: file.id, name: name, }); @@ -31,7 +32,7 @@ function describe(file: Misskey.entities.DriveFile) { file: file, }, { done: caption => { - os.api('drive/files/update', { + misskeyApi('drive/files/update', { fileId: file.id, comment: caption.length === 0 ? null : caption, }); @@ -40,7 +41,7 @@ function describe(file: Misskey.entities.DriveFile) { } function toggleSensitive(file: Misskey.entities.DriveFile) { - os.api('drive/files/update', { + misskeyApi('drive/files/update', { fileId: file.id, isSensitive: !file.isSensitive, }).catch(err => { @@ -69,7 +70,7 @@ async function deleteFile(file: Misskey.entities.DriveFile) { }); if (canceled) return; - os.api('drive/files/delete', { + misskeyApi('drive/files/delete', { fileId: file.id, }); } |