removed unnecesarry cookie stuff

This commit is contained in:
MrFry 2020-04-03 17:21:48 +02:00
parent daeb08341b
commit d9f9a16b49

View file

@ -735,7 +735,6 @@
SendXHRMessage('login', { pw: pw, script: true })
.then((res) => {
if (res.result === 'success') {
setVal('sessionID', res.sessionID)
ConnectToServer(AfterLoad)
ClearAllMessages()
setPassiveButtonState(false)
@ -748,7 +747,6 @@
}
function ConnectToServer (cwith) {
setVal('sessionID', 'gfdgkldf')
ClearAllMessages()
GetXHRInfos().then((inf) => {
if (inf.result === 'nouser') {
@ -1699,12 +1697,10 @@
info().script.version +
'&cid=' + GetId()
console.log(getVal('sessionID'))
xmlhttpRequest({
method: 'GET',
url: url,
headers: {
'Cookie': `sessionID=${getVal('sessionID')}`,
'Content-Type': 'application/json'
},
onload: function (response) {
@ -1793,14 +1789,12 @@
}
const url = apiAdress + path
return new Promise((resolve, reject) => {
console.log(getVal('sessionID'))
xmlhttpRequest({
method: 'POST',
url: url,
xhrFields: { withCredentials: true },
data: message,
headers: {
'Cookie': `sessionID=${getVal('sessionID')}`,
'Content-Type': 'application/json'
},
onerror: function (e) {