Skip to content

Commit

Permalink
fix: ensure correct error handling for export endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
snoopysecurity committed Sep 29, 2021
1 parent cd3abbc commit c934928
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions controllers/passphrase.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,14 @@ module.exports = {
myDoc.fontSize(12)
myDoc.text('Passphrases for created for user: ' + result.user);
myDoc.text('--------------------------------------------------');
try {
data.forEach(function (passphrases) {
myDoc.text("Passphrase: " + passphrases.passphrase);
myDoc.text("Passphrase Reminder: " + passphrases.reminder);
})
} catch (e) {
myDoc.text("Parse Error");
}
myDoc.end();
}

Expand Down
2 changes: 1 addition & 1 deletion public/passphrasegen.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ <h2>PassPhrase Generator</h2>
<div ng-controller="MyController2">
<br>
<br>
<p>Your Saved PassPhrases can be seen below</p>
<p>Your Saved PassPhrases can be seen below. Refresh to see newly created PassPhrases.</p>
<br>
<table>
<tr>
Expand Down

0 comments on commit c934928

Please sign in to comment.