change post to get request with header

This commit is contained in:
Florian Hoss 2022-04-04 11:53:05 +02:00
parent 2d98665f92
commit 6a56b03bf6
3 changed files with 12 additions and 25 deletions

View file

@ -21,8 +21,6 @@
async function submitForm(formData) {
const response = await fetch("/register", {method: 'POST', body: formData, redirect: 'follow'});
if (response.ok) {
const json = await response.json();
console.log(json);
redirect("/");
} else {
redirect("/register");