Skip to content

Commit e4b2588

Browse files
committed
applied copilot suggestions to the pr
1 parent e8f4d79 commit e4b2588

File tree

5 files changed

+9
-3
lines changed

5 files changed

+9
-3
lines changed

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22

example_backend.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const finishStatus = async function (token) {
9696

9797
let response;
9898
try {
99-
response = await fetch(url, { method: "POST", body: "{}", headers: sessionHeaders });
99+
response = await fetch(url, { method: "POST", body: JSON.stringify({}), headers: sessionHeaders });
100100
if (!response.ok) {
101101
throw new Error("Request failed with code " + response.status);
102102
}
@@ -116,7 +116,7 @@ const setStatusClosed = async function (token) {
116116

117117
let response;
118118
try {
119-
response = await fetch(url, { method: "POST", body: "{}", headers: sessionHeaders });
119+
response = await fetch(url, { method: "POST", body: JSON.stringify({}), headers: sessionHeaders });
120120
if (!response.ok) {
121121
throw new Error("Request failed with code " + response.status);
122122
}

main.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ async function getResults() {
8686
results.isValid ? "✓ VALID" : "✗ INVALID"
8787
}</span></p>
8888
`;
89-
document.getElementById("get-results-btn").addEventListener("click", getResults);
9089
} catch (e) {
9190
showError(e);
9291
}

package-lock.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,8 @@
1414
},
1515
"dependencies": {
1616
"dotenv": "^17.3.1"
17+
},
18+
"engines": {
19+
"node": "^20.19.0 || >=22.12.0"
1720
}
1821
}

0 commit comments

Comments
 (0)