Skip to content

Commit

Permalink
liveblocks,优先使用 localStorage 中的验证信息
Browse files Browse the repository at this point in the history
  • Loading branch information
hotlong committed Jan 6, 2025
1 parent 2c7e3df commit fcaf013
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/storybook/stories/liveblocks.amis.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
};
const env = {
assetUrls: [
`${process.env.STEEDOS_UNPKG_URL}/@steedos-widgets/[email protected].6/dist/assets.json`,
`${process.env.STEEDOS_UNPKG_URL}/@steedos-widgets/[email protected].9/dist/assets.json`,
],
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ export const AmisRoomsProvider = (props: any) => {
const headers = {
"Content-Type": "application/json",
};
const authToken = localStorage.getItem("steedos:authToken")
const spaceId = localStorage.getItem("steedos:spaceId")
if (spaceId && authToken) {
headers['Authorization'] = `Bearer ${spaceId},${authToken}`
}

const body = JSON.stringify({
room,
Expand Down

0 comments on commit fcaf013

Please sign in to comment.