mirror of
https://github.com/JonasunderscoreJones/dash.jonasjones.dev.git
synced 2025-10-22 21:09:20 +02:00
fixed email input
This commit is contained in:
parent
b10ce76b7d
commit
a16ee776d3
1 changed files with 5 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { navigate } from 'svelte-routing';
|
import { navigate } from 'svelte-routing';
|
||||||
import { setSessionKey } from '../../utils/session.js';
|
import { setSessionKey } from '../../utils/session.js';
|
||||||
let username = '';
|
let email = '';
|
||||||
let password = '';
|
let password = '';
|
||||||
let errorMessage = '';
|
let errorMessage = '';
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
try {
|
try {
|
||||||
const response = await fetch('https://your-backend-api/login', {
|
const response = await fetch('https://your-backend-api/login', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: JSON.stringify({ username, password }),
|
body: JSON.stringify({ email, password }),
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
}
|
}
|
||||||
|
@ -36,9 +36,9 @@
|
||||||
<p style="color: red;">{errorMessage}</p>
|
<p style="color: red;">{errorMessage}</p>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<form on:submit|preventDefault={handleLogin}>
|
<form on:submit|preventDefault={handleLogin}>
|
||||||
<label for="username">Username:</label>
|
<label for="email">Email:</label>
|
||||||
<input id="username" bind:value={username} required />
|
<input id="email" bind:value={email} required />
|
||||||
|
|
||||||
<label for="password">Password:</label>
|
<label for="password">Password:</label>
|
||||||
<input type="password" id="password" bind:value={password} required />
|
<input type="password" id="password" bind:value={password} required />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue