fix: api compatibility with OctoBase (#1790)

This commit is contained in:
Himself65
2023-04-03 03:50:04 -05:00
committed by GitHub
parent 2cf8ab434e
commit 06a69b0767
2 changed files with 2 additions and 1 deletions

View File

@@ -236,6 +236,7 @@ describe('api', () => {
const publicBinary = await workspaceApis.downloadWorkspace(id, true);
expect(binary).toBeInstanceOf(ArrayBuffer);
expect(publicBinary).toBeInstanceOf(ArrayBuffer);
expect(binary).toEqual(publicBinary);
expect(binary.byteLength).toEqual(publicBinary.byteLength);
},
{

View File

@@ -387,7 +387,7 @@ export function createWorkspaceApis(prefixUrl = '/') {
published = false
): Promise<ArrayBuffer> => {
if (published) {
return fetch(prefixUrl + `api/public/doc/${workspaceId}`, {
return fetch(prefixUrl + `api/public/workspace/${workspaceId}`, {
method: 'GET',
}).then(r => r.arrayBuffer());
} else {