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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user