Registrierung und Login gefixt

This commit is contained in:
Moritz Utcke
2023-04-14 15:30:52 +04:00
parent 24c29214be
commit 452e6aaa28
5 changed files with 16 additions and 30 deletions

View File

@@ -1,7 +1,7 @@
<script lang="ts">
import cookie from "cookiejs"
let username: string;
let email: string;
let password: string;
let hasError: boolean;
@@ -9,7 +9,7 @@
const response = await fetch("/api/login", {
method: "POST",
body: JSON.stringify({
username, password
email, password
})
})
@@ -34,13 +34,13 @@
<p>Das hat leider nicht geklappt, haben sie ihr Passwort und den Nutzernamen richtig eingegeben?</p>
{/if}
<div class="block_4" style="margin-top: 25px;">
<h4 class="heading_3">Benutzername</h4>
<h4 class="heading_3">Email</h4>
<input
type="text"
placeholder="Benutzername"
name="username"
placeholder="Email"
name="email"
class="formInput"
bind:value={username}
bind:value={email}
required
/>
</div>