Skip to content

Commit

Permalink
refactor: removes unnecessary part of logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmed Elghareeb committed Sep 21, 2023
1 parent 5bc682b commit b4499de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions web/backend/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ program
for (let i = 0; i < scipers.length; i += 1) {
const sciper: number = Number(scipers[i]);
if (Number.isNaN(sciper)) {
throw new InvalidArgumentError(`SCIPER '${sciper}' on line ${i + 1} is not a number - exiting!`);
throw new InvalidArgumentError(`SCIPER '${sciper}' on line ${i + 1} is not a number`);
}
if (sciper > 999999 || sciper < 100000) {
throw new InvalidArgumentError(
`SCIPER '${sciper}' on line ${i + 1} is outside acceptable range (100000..999999) - exiting!`
`SCIPER '${sciper}' on line ${i + 1} is outside acceptable range (100000..999999)`
);
}
policies[i] = [scipers[i], electionId, PERMISSIONS.ACTIONS.VOTE];
Expand Down
2 changes: 1 addition & 1 deletion web/backend/src/controllers/dela.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ delaRouter.post('/forms/:formID/vote', (req, res) => {

// DEBUG: this is only for debugging and needs to be replaced before production
const bodyData = req.body;
console.warn('randomizing the SCIPER ID to allow for emulate votes - Use only for Development');
console.warn('DEV CODE - randomizing the SCIPER ID to allow for unlimited votes');
bodyData.UserID = makeid(10);

const dataStr = JSON.stringify(bodyData);
Expand Down

0 comments on commit b4499de

Please sign in to comment.