mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-04 02:49:57 +08:00
fix: use access_token
This commit is contained in:
@@ -32,7 +32,7 @@ const createAffineWebSocketProvider = (
|
|||||||
blockSuiteWorkspace.id,
|
blockSuiteWorkspace.id,
|
||||||
blockSuiteWorkspace.doc,
|
blockSuiteWorkspace.doc,
|
||||||
{
|
{
|
||||||
params: { token: getLoginStorage()?.refresh ?? '' },
|
params: { token: getLoginStorage()?.token ?? '' },
|
||||||
// @ts-expect-error ignore the type
|
// @ts-expect-error ignore the type
|
||||||
awareness: blockSuiteWorkspace.awarenessStore.awareness,
|
awareness: blockSuiteWorkspace.awarenessStore.awareness,
|
||||||
// we maintain broadcast channel by ourselves
|
// we maintain broadcast channel by ourselves
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ describe('ydoc sync', () => {
|
|||||||
BlockSuiteWorkspace.Y.applyUpdate(workspace1.doc, new Uint8Array(binary));
|
BlockSuiteWorkspace.Y.applyUpdate(workspace1.doc, new Uint8Array(binary));
|
||||||
BlockSuiteWorkspace.Y.applyUpdate(workspace2.doc, new Uint8Array(binary));
|
BlockSuiteWorkspace.Y.applyUpdate(workspace2.doc, new Uint8Array(binary));
|
||||||
const provider1 = new KeckProvider(wsUrl, workspace1.id, workspace1.doc, {
|
const provider1 = new KeckProvider(wsUrl, workspace1.id, workspace1.doc, {
|
||||||
params: { token: user1Token.refresh },
|
params: { token: user1Token.token },
|
||||||
// @ts-expect-error ignore the type
|
// @ts-expect-error ignore the type
|
||||||
awareness: workspace1.awarenessStore.awareness,
|
awareness: workspace1.awarenessStore.awareness,
|
||||||
disableBc: true,
|
disableBc: true,
|
||||||
@@ -97,7 +97,7 @@ describe('ydoc sync', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const provider2 = new KeckProvider(wsUrl, workspace2.id, workspace2.doc, {
|
const provider2 = new KeckProvider(wsUrl, workspace2.id, workspace2.doc, {
|
||||||
params: { token: user2Token.refresh },
|
params: { token: user2Token.token },
|
||||||
// @ts-expect-error ignore the type
|
// @ts-expect-error ignore the type
|
||||||
awareness: workspace2.awarenessStore.awareness,
|
awareness: workspace2.awarenessStore.awareness,
|
||||||
disableBc: true,
|
disableBc: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user