fix: api compatibility with OctoBase (#1790)

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

No files matched your search

@@ -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);
},
{
+1 -1
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 {