refactor: add ;
This commit is contained in:
parent
a07b893eb9
commit
7d259ceef8
1 changed files with 6 additions and 5 deletions
|
@ -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("/")});
|
||||||
|
|
Loading…
Reference in a new issue