mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-25 12:59:06 +01:00
Fix #5: /api/jwt/ request method
This commit is contained in:
parent
82720c7580
commit
dc6234088b
@ -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))
|
||||
}))
|
||||
|
Loading…
Reference in New Issue
Block a user