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:
parent
ea41cc6ec0
commit
fa9c4a19b9
191 changed files with 581 additions and 468 deletions
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
import { ref, computed } from 'vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
|
||||
type SaveData = {
|
||||
gameVersion: number;
|
||||
|
|
@ -23,7 +23,7 @@ let prev = '';
|
|||
|
||||
export async function load() {
|
||||
try {
|
||||
saveData.value = await os.api('i/registry/get', {
|
||||
saveData.value = await misskeyApi('i/registry/get', {
|
||||
scope: ['clickerGame'],
|
||||
key: 'saveData',
|
||||
});
|
||||
|
|
@ -63,7 +63,7 @@ export async function save() {
|
|||
const current = JSON.stringify(saveData.value);
|
||||
if (current === prev) return;
|
||||
|
||||
await os.api('i/registry/set', {
|
||||
await misskeyApi('i/registry/set', {
|
||||
scope: ['clickerGame'],
|
||||
key: 'saveData',
|
||||
value: saveData.value,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue