Integrate unfinished server-rs refactor worklists

This commit is contained in:
2026-04-30 13:39:06 +08:00
parent 62934b0809
commit 7ab0933f6d
676 changed files with 24487 additions and 21531 deletions

View File

@@ -23,11 +23,11 @@ describe('rpgProfileClient browse history routes', () => {
requestJsonMock.mockResolvedValue({ entries: [] });
});
it('reads browse history from the runtime profile route', async () => {
it('reads browse history from the profile route', async () => {
await listRpgProfileBrowseHistory();
expect(requestJsonMock).toHaveBeenCalledWith(
'/api/runtime/profile/browse-history',
'/api/profile/browse-history',
expect.objectContaining({ method: 'GET' }),
'读取浏览历史失败',
expect.objectContaining({
@@ -36,7 +36,7 @@ describe('rpgProfileClient browse history routes', () => {
);
});
it('writes browse history through the runtime profile route', async () => {
it('writes browse history through the profile route', async () => {
await upsertRpgProfileBrowseHistory({
ownerUserId: 'user-1',
profileId: 'profile-1',
@@ -49,7 +49,7 @@ describe('rpgProfileClient browse history routes', () => {
});
expect(requestJsonMock).toHaveBeenCalledWith(
'/api/runtime/profile/browse-history',
'/api/profile/browse-history',
expect.objectContaining({
method: 'POST',
headers: { 'Content-Type': 'application/json' },
@@ -64,7 +64,7 @@ describe('rpgProfileClient browse history routes', () => {
);
});
it('syncs browse history through the runtime profile route', async () => {
it('syncs browse history through the profile route', async () => {
await syncRpgProfileBrowseHistory([
{
ownerUserId: 'user-1',
@@ -79,7 +79,7 @@ describe('rpgProfileClient browse history routes', () => {
]);
expect(requestJsonMock).toHaveBeenCalledWith(
'/api/runtime/profile/browse-history',
'/api/profile/browse-history',
expect.objectContaining({
method: 'POST',
headers: { 'Content-Type': 'application/json' },
@@ -89,11 +89,11 @@ describe('rpgProfileClient browse history routes', () => {
);
});
it('clears browse history through the runtime profile route', async () => {
it('clears browse history through the profile route', async () => {
await clearRpgProfileBrowseHistory();
expect(requestJsonMock).toHaveBeenCalledWith(
'/api/runtime/profile/browse-history',
'/api/profile/browse-history',
expect.objectContaining({ method: 'DELETE' }),
'清空浏览历史失败',
expect.objectContaining({
@@ -112,11 +112,11 @@ describe('rpgProfileClient save archive routes', () => {
requestJsonMock.mockResolvedValue({ entries: [] });
});
it('reads save archives from the runtime profile route', async () => {
it('reads save archives from the profile route', async () => {
await listRpgProfileSaveArchives();
expect(requestJsonMock).toHaveBeenCalledWith(
'/api/runtime/profile/save-archives',
'/api/profile/save-archives',
expect.objectContaining({ method: 'GET' }),
'读取存档列表失败',
expect.objectContaining({
@@ -125,7 +125,7 @@ describe('rpgProfileClient save archive routes', () => {
);
});
it('resumes a save archive through the runtime profile route', async () => {
it('resumes a save archive through the profile route', async () => {
requestJsonMock.mockResolvedValueOnce({
entry: {
worldKey: 'custom:world-1',
@@ -144,7 +144,7 @@ describe('rpgProfileClient save archive routes', () => {
await resumeRpgProfileSaveArchive('custom:world-1');
expect(requestJsonMock).toHaveBeenCalledWith(
'/api/runtime/profile/save-archives/custom%3Aworld-1',
'/api/profile/save-archives/custom%3Aworld-1',
expect.objectContaining({ method: 'POST' }),
'恢复存档失败',
expect.objectContaining({