11
This commit is contained in:
@@ -5,8 +5,8 @@ import { useAuthStore } from "../stores/auth";
|
||||
const router = useRouter();
|
||||
const auth = useAuthStore();
|
||||
|
||||
function onLogout() {
|
||||
auth.logout();
|
||||
async function onLogout() {
|
||||
await auth.logout();
|
||||
router.push({ name: "login" });
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -16,7 +16,7 @@ async function onSubmit() {
|
||||
feedback.value = { severity: "", message: "" };
|
||||
loading.value = true;
|
||||
|
||||
const result = auth.login({
|
||||
const result = await auth.login({
|
||||
username: username.value,
|
||||
password: password.value,
|
||||
});
|
||||
|
||||
@@ -17,7 +17,7 @@ async function onSubmit() {
|
||||
feedback.value = { severity: "", message: "" };
|
||||
loading.value = true;
|
||||
|
||||
const result = auth.register({
|
||||
const result = await auth.register({
|
||||
username: username.value,
|
||||
password: password.value,
|
||||
confirmPassword: confirmPassword.value,
|
||||
|
||||
Reference in New Issue
Block a user