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