I messed up the domain name

This commit is contained in:
ION606
2022-07-31 14:24:02 +03:00
parent c49999071f
commit 10d16b8f6c
4 changed files with 10 additions and 19 deletions
+3 -12
View File
@@ -259,7 +259,7 @@
//Load the channels
var xhr = new XMLHttpRequest();
xhr.open('get', `http://selmerbot.com/getChannels/`, true);
xhr.open('get', `http://www.selmerbot.com/getChannels/`, true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
xhr.setRequestHeader('serverNumber', serverSettings.Id);
xhr.onloadend = (e) => {
@@ -315,10 +315,7 @@
}
xhr.send();
//Get serverId
// xhr2 = new XMLHttpRequest();
// xhr.open('get', 'http://localhost:53134/getCal', true);
// xhr.setRequestHeader('userId', serverSettings)
}
@@ -388,7 +385,7 @@
//Send the data to the server
var xhr = new XMLHttpRequest();
xhr.open('post', 'http://selmerbot.com/sendData/', true);
xhr.open('post', 'http://www.selmerbot.com/sendData/', true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
xhr.setRequestHeader('serverSettings', JSON.stringify(serverSettings));
@@ -450,7 +447,6 @@
<div id="buttons" class="buttonsmainbar">
<button onclick="divChange('welcome')" class="btnside">Welcome</button>
<button onclick="divChange('log')" class="btnside">Logging</button>
<!-- <button onclick="divChange('cal')" class="btnside">Calendar</button> -->
</div>
</div>
@@ -505,11 +501,6 @@
<input type="submit" value="Submit", class="submitButton" onclick="sendData(event, { 'inp': 'logs' })">
</form>
</div>
<div id="cal", class="hide wc" style="margin-top: 20px;">
<button class="helpbtn" onclick="alert('Use {sn} to insert the server name, {un} to insert the user name, and {ut} to insert the user tag\nExample: Welcome to {sn} Sir {un}#{ut}')"><img src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fwww.downloadclipart.net%2Flarge%2F45627-icon-with-question-mark-clipart.png&f=1&nofb=1" style="width: 50px; border-radius: 50%; border-style: solid;"></button>
</div>
</div>
</div>
+4 -4
View File
@@ -242,12 +242,12 @@
// alert('Loading, please hold!\nps - You can close this alert :)');
var xhr = new XMLHttpRequest();
xhr.open('post', 'http://selmerbot.com/user/', true);
xhr.open('post', 'http://www.selmerbot.com/user/', true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
xhr.setRequestHeader('guilds', JSON.stringify(owned));
xhr.setRequestHeader('userId', window.localStorage.getItem('Id'));
xhr.onloadend = (e) => { window.localStorage.setItem('guilds', (JSON.stringify(xhr.response))); window.location = 'http://selmerbot.com/myGuilds.html'; }
xhr.onloadend = (e) => { window.localStorage.setItem('guilds', (JSON.stringify(xhr.response))); window.location = 'http://www.selmerbot.com/myGuilds.html'; }
xhr.send(JSON.stringify(owned));
}).then((r) => {
@@ -258,13 +258,13 @@
</script>
<script>
//Get the redirect link <!-- NOTE: "response_type=token" ALWAYS!!! http://selmerbot.com/ -->
//Get the redirect link <!-- NOTE: "response_type=token" ALWAYS!!! http://www.selmerbot.com/ -->
function getAPIRedirect() {
if (window.location.href.indexOf('localhost') != -1) {
return 'https://discord.com/api/oauth2/authorize?client_id=926551095352901632&redirect_uri=http%3A%2F%2Flocalhost%3A53134%2F&response_type=token&scope=identify%20guilds';
} else {
// return "https://discord.com/api/oauth2/authorize?client_id=944046902415093760&redirect_uri=https%3A%2F%2Fselmer-bot-website.herokuapp.com%2F&response_type=token&scope=identify%20guilds"
return 'https://discord.com/api/oauth2/authorize?client_id=944046902415093760&redirect_uri=http%3A%2F%2Fselmerbot.com%2F&response_type=code&scope=identify%20guilds';
return 'https://discord.com/api/oauth2/authorize?client_id=944046902415093760&redirect_uri=http%3A%2F%2Fwww.selmerbot.com%2F&response_type=code&scope=identify%20guilds';
}
}
+1 -1
View File
@@ -166,7 +166,7 @@ app.get('/', async ({ query }, response) => {
client_secret: clientSecret,
code,
grant_type: 'authorization_code',
redirect_uri: `http://selmerbot.com/`,
redirect_uri: `http://www.selmerbot.com/`,
scope: 'identify',
}),
headers: {
+2 -2
View File
@@ -92,10 +92,10 @@
imagem.onclick = function() {
console.log('LOADING.....');
var xhr = new XMLHttpRequest();
xhr.open('post', 'http://selmerbot.com/getServer/', true);
xhr.open('post', 'http://www.selmerbot.com/getServer/', true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
xhr.setRequestHeader('serverNumber', guilds[i].id);
xhr.onloadend = (e) => { window.localStorage.setItem('serverInfo', (xhr.response)); window.location = 'http://selmerbot.com//dashboard.html'; }
xhr.onloadend = (e) => { window.localStorage.setItem('serverInfo', (xhr.response)); window.location = 'http://www.selmerbot.com//dashboard.html'; }
xhr.send();
}
} else {