Process token retrieve through Slim controller

This commit is contained in:
ArthurHoaro 2020-06-21 12:21:31 +02:00
parent 1b8620b1ad
commit 764d34a7d3
5 changed files with 71 additions and 4 deletions
assets/default/js

View file

@ -27,7 +27,7 @@ function findParent(element, tagName, attributes) {
*/
function refreshToken(basePath) {
const xhr = new XMLHttpRequest();
xhr.open('GET', `${basePath}/?do=token`);
xhr.open('GET', `${basePath}/admin/token`);
xhr.onload = () => {
const token = document.getElementById('token');
token.setAttribute('value', xhr.responseText);