Fixed a really stupid mistake

This commit is contained in:
ION606
2022-08-14 11:21:20 -07:00
parent 1f1043f864
commit adaf982273
+7 -4
View File
@@ -394,9 +394,9 @@
window.onload = () => {
var serverSettings = JSON.parse(window.localStorage.getItem('serverInfo'));
var sessionId = window.localStorage.getItem('sessionId');
if (!serverSettings) {
if (!sessionId) {
alert("Please log in to continue");
if (window.location.href.indexOf('localhost') != -1) {
window.location = 'https://discord.com/api/oauth2/authorize?client_id=926551095352901632&redirect_uri=http%3A%2F%2Flocalhost%3A53134%2F&response_type=token&scope=identify%20guilds';
@@ -406,8 +406,10 @@
}
//Get serverId
const id = serverSettings.Id; // window.localStorage.getItem('Id').toString();
// const id = serverSettings.Id; // window.localStorage.getItem('Id').toString();
const session = getSessionData();
session.then((sessionInfo) => {
const id = sessionInfo.userId;
//Check if the user has premium
var xhrverify = new XMLHttpRequest();
xhrverify.open('post', 'http://www.selmerbot.com/verifypremium/', true);
@@ -460,6 +462,7 @@
}
xhrverify.send();
});
}
</script>
</head>