From dc6234088b693cf25d4816ac3a602dc72242eede Mon Sep 17 00:00:00 2001 From: Lou Knauer Date: Tue, 15 Mar 2022 08:36:45 +0100 Subject: [PATCH] Fix #5: /api/jwt/ request method --- templates/config.tmpl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/templates/config.tmpl b/templates/config.tmpl index 9e587c2..9e44f38 100644 --- a/templates/config.tmpl +++ b/templates/config.tmpl @@ -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)) }))