fix(web): fix token.js
This commit is contained in:
parent
46e67488f1
commit
7c58f011ca
@ -2,6 +2,7 @@ $(window).on("load", function () {
|
||||
let authorized = true;
|
||||
if ($.cookie("token") == null) {
|
||||
authorized = false;
|
||||
} else {
|
||||
$.ajax({
|
||||
url: "/token",
|
||||
type: "POST",
|
||||
@ -9,9 +10,7 @@ $(window).on("load", function () {
|
||||
data: `{"token":"${$.cookie("token")}"}`,
|
||||
dataType: "json",
|
||||
success: function (resp) {
|
||||
if (resp.status) {
|
||||
authorized = true;
|
||||
}
|
||||
authorized = resp.status;
|
||||
},
|
||||
failure: function (err) {
|
||||
alert(err);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user