This commit is contained in:
2026-05-09 18:24:08 +08:00
parent a0ed128bde
commit bc704d0c22
38 changed files with 481 additions and 378 deletions

View File

@@ -21,6 +21,7 @@ import type {
import { rehydrateSavedSnapshot } from '../../persistence/runtimeSnapshot';
import type { HydratedSavedGameSnapshot } from '../../persistence/runtimeSnapshotTypes';
import {
RUNTIME_BACKGROUND_AUTH_OPTIONS,
requestRpgRuntimeJson,
type RuntimeRequestOptions,
} from '../rpg-runtime/rpgRuntimeRequest';
@@ -199,7 +200,10 @@ export async function listRpgProfileSaveArchives(
'/profile/save-archives',
{ method: 'GET' },
'读取存档列表失败',
options,
{
...RUNTIME_BACKGROUND_AUTH_OPTIONS,
...options,
},
);
return Array.isArray(response?.entries) ? response.entries : [];
@@ -231,7 +235,10 @@ export async function listRpgProfileBrowseHistory(
'/profile/browse-history',
{ method: 'GET' },
'读取浏览历史失败',
options,
{
...RUNTIME_BACKGROUND_AUTH_OPTIONS,
...options,
},
);
return Array.isArray(response?.entries) ? response.entries : [];
@@ -249,7 +256,10 @@ export async function upsertRpgProfileBrowseHistory(
body: JSON.stringify(entry),
},
'写入浏览历史失败',
options,
{
...RUNTIME_BACKGROUND_AUTH_OPTIONS,
...options,
},
);
return Array.isArray(response?.entries) ? response.entries : [];