Skip to content

Commit

Permalink
[wopi] Add apiQuery param to api.js
Browse files Browse the repository at this point in the history
  • Loading branch information
konovalovsergey committed Aug 26, 2024
1 parent 4a1909b commit 2175239
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DocService/sources/wopiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ async function checkAndReplaceEmptyFile(ctx, fileInfo, wopiSrc, access_token, ac
}
function getEditorHtml(req, res) {
return co(function*() {
let params = {key: undefined, fileInfo: {}, userAuth: {}, queryParams: req.query, token: undefined, documentType: undefined, docs_api_config: {}};
let params = {key: undefined, apiQuery: '', fileInfo: {}, userAuth: {}, queryParams: req.query, token: undefined, documentType: undefined, docs_api_config: {}};
let ctx = new operationContext.Context();
try {
ctx.initFromRequest(req);
Expand All @@ -520,6 +520,7 @@ function getEditorHtml(req, res) {
ctx.logger.debug(`wopiEditor req.url:%s`, req.url);
ctx.logger.debug(`wopiEditor req.query:%j`, req.query);
ctx.logger.debug(`wopiEditor req.body:%j`, req.body);
params.apiQuery = `?${constants.SHARD_KEY_WOPI_NAME}=${encodeURIComponent(wopiSrc)}`;
params.documentType = req.params.documentType;
let mode = req.params.mode;
let sc = req.query['sc'];
Expand Down

0 comments on commit 2175239

Please sign in to comment.