Skip to content

Commit b78729e

Browse files
committed
Fix status code comparison in check.js and download.js
1 parent bc6a07f commit b78729e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

js/check.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ function check() {
2727
fetch(requestUrl)
2828
.then(response => response.json())
2929
.then(result => {
30-
if (result.code == "200") {
30+
if (result.status == "200") {
3131
document.getElementById("permission").innerHTML = result.permission;
3232
loadingModal.hide();
3333
successModal.show();
34-
} else if (result.code == "404") {
34+
} else if (result.status == "404") {
3535
loadingModal.hide();
3636
notfoundModal.show();
3737
} else {

js/download.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ function downloadRequest() {
2828
fetch(requestUrl)
2929
.then(response => response.json())
3030
.then(result => {
31-
if (result.status == "200") {
31+
if (result.code == "200") {
3232
loadingModal.hide();
3333
successModal.show();
34-
} else if (result.status == "403") {
34+
} else if (result.code == "403") {
3535
loadingModal.hide();
3636
invalidModal.show();
3737
} else {

0 commit comments

Comments
 (0)