Added settings for changing password

This commit is contained in:
2025-10-04 13:41:40 +02:00
parent 9fbd6e4191
commit 38eee8b38c
6 changed files with 140 additions and 16 deletions

View File

@@ -1,7 +1,7 @@
<script lang="ts">
import { goto } from "$app/navigation";
import { env } from "$env/dynamic/public";
import UserState from "$lib/User.svelte";
import UserState, { type UserObj } from "$lib/User.svelte";
import axios from "axios";
let username = $state("");
@@ -20,7 +20,8 @@
)
.then((response) => {
if (response.status === 200) {
UserState.username = response.data;
UserState.user = response.data as UserObj;
console.log(UserState.id, UserState.username, UserState.role);
goto("/");
}
})