Skip to content

Commit

Permalink
adapt stored excalidraw json to make files importable on excalidraw.com
Browse files Browse the repository at this point in the history
Signed-off-by: grnd-alt <[email protected]>
  • Loading branch information
grnd-alt committed Sep 16, 2024
1 parent 48d7306 commit 6527840
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion websocket_server/ApiService.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,14 @@ export default class ApiService {
console.log(`[${roomID}] Saving room data to server: ${roomData.length} elements, ${Object.keys(files).length} files`)

const url = `${this.NEXTCLOUD_URL}/index.php/apps/whiteboard/${roomID}`
const body = { data: { elements: roomData, files: this.cleanupFiles(roomData, files) } }
const body = {
data: {
type: 'excalidraw',
version: 2,
elements: roomData,
files: this.cleanupFiles(roomData, files),
},
}
const options = this.fetchOptions('PUT', null, body, roomID, lastEditedUser)
return this.fetchData(url, options)
}
Expand Down

0 comments on commit 6527840

Please sign in to comment.