Skip to content

Commit

Permalink
moving on
Browse files Browse the repository at this point in the history
  • Loading branch information
kreynoldsf5 committed May 2, 2024
1 parent 085304a commit 4a8571a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions labapp/app/static/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ async function makeHttpRequest(buttonId, requestUrl, resultDivId) {
const response = await axios.get(requestUrl);
if (response.data.status === 'success') {
const prettyJson = JSON.stringify(response.data.data, null, 4);
resultDiv.innerHTML = `<div class="alert alert-success"><b>Request Succeeded:</b><br><code>${prettyJson}</code></div>`;
resultDiv.innerHTML = `<div class="alert alert-success"><b>Request Succeeded:</b><br><pre><code>${prettyJson}</code></pre></div>`;
} else {
const errJson = JSON.stringify(response.data.error, null, 4);
resultDiv.innerHTML = `<div class="alert alert-danger"><b>Request Failed:</b><br<code>${errJson}</code></div>`;
resultDiv.innerHTML = `<div class="alert alert-danger"><b>Request Failed:</b><br<pre><code>${errJson}</code></pre></div>`;
}
} catch (error) {
resultDiv.innerHTML = `<div class="alert alert-danger">Error: ${error.message}</div>`;
Expand Down

0 comments on commit 4a8571a

Please sign in to comment.