mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix: api compatibility with OctoBase (#1790)
This commit is contained in:
@@ -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);
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user