fix wid and date api calls

This commit is contained in:
Raphael 2022-02-16 14:15:14 +01:00
parent ce2d2f5147
commit 43b931e573
2 changed files with 4 additions and 4 deletions

View File

@ -102,7 +102,7 @@ function startBackendServer(port) {
* *
* @apiParam {Number} wid WhiteboardId you find in the Whiteboard URL * @apiParam {Number} wid WhiteboardId you find in the Whiteboard URL
* @apiParam {Number} [at] Accesstoken (Only if activated for this server) * @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 {Boolean} webdavaccess set true to upload to webdav (Optional; Only if activated for this server)
* @apiParam {String} imagedata The imagedata base64 encoded * @apiParam {String} imagedata The imagedata base64 encoded
* *
@ -212,7 +212,7 @@ function startBackendServer(port) {
function progressUploadFormData(formData, callback) { function progressUploadFormData(formData, callback) {
console.log("Progress new Form Data"); console.log("Progress new Form Data");
const fields = escapeAllContentStrings(formData.fields); const fields = escapeAllContentStrings(formData.fields);
const wid = fields["whiteboardId"]; const wid = fields["wid"];
if (ReadOnlyBackendService.isReadOnly(wid)) return; if (ReadOnlyBackendService.isReadOnly(wid)) return;
const readOnlyWid = ReadOnlyBackendService.getReadOnlyId(wid); const readOnlyWid = ReadOnlyBackendService.getReadOnlyId(wid);

View File

@ -926,7 +926,7 @@ function initWhiteboard() {
url: document.URL.substr(0, document.URL.lastIndexOf("/")) + "/api/upload", url: document.URL.substr(0, document.URL.lastIndexOf("/")) + "/api/upload",
data: { data: {
imagedata: base64data, imagedata: base64data,
whiteboardId: whiteboardId, wid: whiteboardId,
date: date, date: date,
at: accessToken, at: accessToken,
}, },
@ -952,7 +952,7 @@ function initWhiteboard() {
url: document.URL.substr(0, document.URL.lastIndexOf("/")) + "/api/upload", url: document.URL.substr(0, document.URL.lastIndexOf("/")) + "/api/upload",
data: { data: {
imagedata: base64data, imagedata: base64data,
whiteboardId: whiteboardId, wid: whiteboardId,
date: date, date: date,
at: accessToken, at: accessToken,
webdavaccess: JSON.stringify(webdavaccess), webdavaccess: JSON.stringify(webdavaccess),