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 821fa10
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",

Check failure on line 64 in websocket_server/ApiService.js

View workflow job for this annotation

GitHub Actions / NPM lint

Strings must use singlequote
version: 2,
elements: roomData,
files: this.cleanupFiles(roomData, files)

Check warning on line 67 in websocket_server/ApiService.js

View workflow job for this annotation

GitHub Actions / NPM lint

Missing trailing comma
}

Check warning on line 68 in websocket_server/ApiService.js

View workflow job for this annotation

GitHub Actions / NPM lint

Missing trailing comma
}
const options = this.fetchOptions('PUT', null, body, roomID, lastEditedUser)
return this.fetchData(url, options)
}
Expand Down

0 comments on commit 821fa10

Please sign in to comment.