Skip to content
Snippets Groups Projects

Fix getpassports.

Merged Igor Markin requested to merge fix-wopi-get-passports into master
1 file
+ 9
4
Compare changes
  • Side-by-side
  • Inline
@@ -3,7 +3,15 @@ const axios = require('axios');
function WopiAPI() {}
WopiAPI.prototype.getPassports = function (fileID) {
const [protocol, host] = window.API_HOST.split(':');
let url = `${protocol}:${host}${window.WOPI_URI_PREFIX}`;
url = url.charAt(url.length - 1) === "/" ? url : url + "/";
url += 'getPassports';
const requestConfig = {
url,
method: 'POST',
headers: {
publicKey: window.viamApi.getConfig().headers.publicKey,
uuid: window.viamApi.getConfig().headers.uuid,
@@ -14,10 +22,7 @@ WopiAPI.prototype.getPassports = function (fileID) {
}
};
const [protocol, host] = window.API_HOST.split(':');
const url = `${protocol}${host}${window.WOPI_URI_PREFIX}/getPassports`;
return axios.post(url, {}, requestConfig);
return axios(requestConfig);
};
module.exports = WopiAPI;
Loading