refactor: no-floating-promises

This commit is contained in:
Tibo De Peuter 2025-03-23 13:55:26 +01:00
parent af57cb5d71
commit 4bf82b09fa
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
4 changed files with 19 additions and 18 deletions

View file

@ -1,6 +1,6 @@
<script setup lang="ts">
import auth from "@/services/auth/auth-service.ts";
auth.loadUser();
await auth.loadUser();
</script>
<template>

View file

@ -2,16 +2,16 @@
import dwengoLogo from "../../../assets/img/dwengo-groen-zwart.svg";
import auth from "@/services/auth/auth-service.ts";
function loginAsStudent(): void {
auth.loginAs("student");
async function loginAsStudent(): Promise<void> {
await auth.loginAs("student");
}
function loginAsTeacher(): void {
auth.loginAs("teacher");
async function loginAsTeacher(): Promise<void> {
await auth.loginAs("teacher");
}
function performLogout(): void {
auth.logout();
async function performLogout(): Promise<void> {
await auth.logout();
}
</script>