Skip to content

Commit

Permalink
Refactor matcher.js to fix conditional statement bug
Browse files Browse the repository at this point in the history
  • Loading branch information
RaannaKasturi committed Sep 13, 2024
1 parent fcbc5e8 commit 3f8e58e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion assets/scripts/matcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function matcher(event) {
const result = await get_data(csrpvt, ssl)
console.log(result.data[0]);
console.log(typeof(result.data[0]));
if (result.data[0] === 'CSR match SSL' || result.data === 'Private Key match SSL') {
if (result.data[0] === 'CSR match SSL' || result.data[0] === 'Private Key match SSL') {
document.getElementById('matchstatus').classList.add('border-success')
} else {
document.getElementById('matchstatus').classList.add('border-danger')
Expand Down
6 changes: 2 additions & 4 deletions tool/generate.html
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,8 @@ <h1>Create Private Key & CSR</h1>
placeholder="CSR will be displayed here." readonly></textarea>
<div class="col-12 mt-3 d-flex justify-content-center gap-5">
<button class="btn btn-clipboard btn-outline-primary copy" data-clipboard-target="#csrdata"
onclick="copyText('csrdata')">Copy Private
Key</button>
<button class="btn btn-primary" onclick="downloadText('csr.pem')">Download
Private Key</button>
onclick="copyText('csrdata')">Copy CSR</button>
<button class="btn btn-primary" onclick="downloadText('csr.pem')">Download CSR</button>
</div>
</div>
</div>
Expand Down

0 comments on commit 3f8e58e

Please sign in to comment.