refactor: add ;

This commit is contained in:
rick 2021-09-09 02:06:39 +02:00
parent a07b893eb9
commit 7d259ceef8
Signed by: Rick
GPG key ID: 2B593F087240EE99

View file

@ -1,13 +1,14 @@
const hash = window.location.hash.substring(1).split('&')
var datas = {}
const hash = window.location.hash.substring(1).split('&');
var datas = {};
for (let elem of hash) {
elem = elem.split('=')
datas[elem[0]] = elem[1]
elem = elem.split('=');
datas[elem[0]] = elem[1];
}
fetch('/mytoken', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(datas)
}).then(() => {window.location.replace("/")})
}).then(() => {window.location.replace("/")});