Skip to content

Commit

Permalink
ACA-4175 Added a constant for the User's home folders path
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Hunter committed Dec 10, 2020
1 parent c657747 commit ed34ea0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/cli/scripts/scan-env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const program = require('commander');
const MAX_ATTEMPTS = 10;
const TIMEOUT = 60000;
const MAX_PEOPLE_PER_PAGE = 100;
const USERS_HOME_RELATIVE_PATH = 'User Homes';

let jsApiConnection;
let loginAttempts: number = 0;
Expand Down Expand Up @@ -76,7 +77,7 @@ async function getPeopleCount(skipCount: number = 0): Promise<PeopleTally> {
async function getHomeFoldersCount(): Promise<number> {
try {
const nodesApi = new NodesApi(jsApiConnection);
const homesFolderApiResult = await nodesApi.listNodeChildren('-root-', { relativePath: 'User Homes' });
const homesFolderApiResult = await nodesApi.listNodeChildren('-root-', { relativePath: USERS_HOME_RELATIVE_PATH });
return homesFolderApiResult.list.pagination.totalItems;
} catch (error) {
console.log(error);
Expand Down

0 comments on commit ed34ea0

Please sign in to comment.