literally every time
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 6s

This commit is contained in:
2026-03-17 22:31:13 -05:00
parent 661bb03d1d
commit 8c86f5ddce
4 changed files with 170 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
<script setup lang="ts">
import { onMounted, reactive } from "vue";
import { useRoute, useRouter } from "vue-router";
import * as authApi from "../api/AuthApi";
const router = useRouter();
const user = reactive({
username: "",
password: ""
});
onMounted(() => {
});
async function login(): Promise<void> {
const success: boolean = await authApi.login(user);
if(success) {
router.push("/users"); // redirect
} else {
// prompt try again
}
}
</script>
<template>
<div>
<h2>Login</h2>
<form @submit.prevent="login">
<input v-model="user.username" placeholder="username" />
<input v-model="user.password" type="password" placeholder="password" />
<button type="submit">Submit</button>
</form>
</div>
</template>