From 43b931e57345746ec78e1f06d24606fe3e7685e8 Mon Sep 17 00:00:00 2001 From: Raphael Date: Wed, 16 Feb 2022 14:15:14 +0100 Subject: [PATCH] fix wid and date api calls --- scripts/server-backend.js | 4 ++-- src/js/main.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/server-backend.js b/scripts/server-backend.js index 7cf9f13..cf21b15 100644 --- a/scripts/server-backend.js +++ b/scripts/server-backend.js @@ -102,7 +102,7 @@ function startBackendServer(port) { * * @apiParam {Number} wid WhiteboardId you find in the Whiteboard URL * @apiParam {Number} [at] Accesstoken (Only if activated for this server) - * @apiParam {Number} current timestamp + * @apiParam {Number} date current timestamp * @apiParam {Boolean} webdavaccess set true to upload to webdav (Optional; Only if activated for this server) * @apiParam {String} imagedata The imagedata base64 encoded * @@ -212,7 +212,7 @@ function startBackendServer(port) { function progressUploadFormData(formData, callback) { console.log("Progress new Form Data"); const fields = escapeAllContentStrings(formData.fields); - const wid = fields["whiteboardId"]; + const wid = fields["wid"]; if (ReadOnlyBackendService.isReadOnly(wid)) return; const readOnlyWid = ReadOnlyBackendService.getReadOnlyId(wid); diff --git a/src/js/main.js b/src/js/main.js index 570c89d..fe4bf6b 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -926,7 +926,7 @@ function initWhiteboard() { url: document.URL.substr(0, document.URL.lastIndexOf("/")) + "/api/upload", data: { imagedata: base64data, - whiteboardId: whiteboardId, + wid: whiteboardId, date: date, at: accessToken, }, @@ -952,7 +952,7 @@ function initWhiteboard() { url: document.URL.substr(0, document.URL.lastIndexOf("/")) + "/api/upload", data: { imagedata: base64data, - whiteboardId: whiteboardId, + wid: whiteboardId, date: date, at: accessToken, webdavaccess: JSON.stringify(webdavaccess),