Fix #5: /api/jwt/ request method

This commit is contained in:
Lou Knauer 2022-03-15 08:36:45 +01:00
parent 82720c7580
commit dc6234088b

View File

@ -79,9 +79,7 @@
listElement.querySelectorAll('button.get-jwt').forEach(e => e.addEventListener('click', event => {
let row = event.target.parentElement.parentElement
let username = row.children[0].innerText
let formData = new FormData()
formData.append('username', username)
fetch('/api/jwt/', { method: 'POST', body: formData })
fetch(`/api/jwt/?username=${username}`)
.then(res => res.text())
.then(text => alert(text))
}))