aboutsummaryrefslogtreecommitdiff
path: root/web/pw-server/src/routes/login.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'web/pw-server/src/routes/login.svelte')
-rw-r--r--web/pw-server/src/routes/login.svelte8
1 files changed, 4 insertions, 4 deletions
diff --git a/web/pw-server/src/routes/login.svelte b/web/pw-server/src/routes/login.svelte
index 9ff0378..911635b 100644
--- a/web/pw-server/src/routes/login.svelte
+++ b/web/pw-server/src/routes/login.svelte
@@ -1,6 +1,7 @@
<script lang="ts">
import { get_session_token, set_session_token } from "$lib/auth";
import { goto } from "$app/navigation";
+ import { currentUser } from "$lib/stores/current_user";
let username: string | undefined;
let password: string | undefined;
@@ -24,7 +25,8 @@
let token = response.headers.get("Token");
set_session_token(token);
- let user = await response.json();
+ const user = await response.json();
+ currentUser.set(user);
goto("/");
}
@@ -35,7 +37,6 @@
}
</script>
-
<div class="page-card">
<div class="page-card-content">
<h1 class="page-card-header">Sign in</h1>
@@ -49,7 +50,6 @@
</div>
</div>
-
<style lang="scss">
@import "src/styles/account_forms.scss";
-</style> \ No newline at end of file
+</style>