Skip to content

Commit

Permalink
[feature] Rework 'license.quota' command params of CommandSevice
Browse files Browse the repository at this point in the history
  • Loading branch information
konovalovsergey committed May 24, 2021
1 parent 864752b commit 1772605
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions DocService/sources/DocsCoServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3225,12 +3225,15 @@ exports.licenseInfo = function(req, res) {
});
};
let commandLicense = co.wrap(function*() {
let res = {license: utils.convertLicenseInfoToFileParams(licenseInfo), server: utils.convertLicenseInfoToServerParams(licenseInfo), quota: {}};
let res = {
license: utils.convertLicenseInfoToFileParams(licenseInfo),
server: utils.convertLicenseInfoToServerParams(licenseInfo), quota: {users: []}
};
const nowUTC = getLicenseNowUtc();
let scores = [];
let execRes = yield editorData.getPresenceUniqueUser(nowUTC, scores);
execRes.forEach(function(currentValue, index){
res.quota[currentValue] = new Date(scores[index] * 1000);
execRes.forEach(function(currentValue, index) {
res.quota.users.push({userid: currentValue, expire: new Date(scores[index] * 1000)});
});
return res;
});
Expand Down

0 comments on commit 1772605

Please sign in to comment.