#28 style: fix lint issues in auth components

This commit is contained in:
mono
2026-03-07 17:03:30 -05:00
parent 3112c82bb2
commit 7f73251c5e
5 changed files with 33 additions and 33 deletions

View File

@@ -61,7 +61,6 @@
});
this.$router.push({ path: '/' });
} catch (e) {
// Si el servicio devuelve un error (ej. 401) lo convertimos en excepción
const msg = e?.response?.data?.message ?? e.message;
this.error = msg ?? 'Error al iniciar sesión';
}

View File

@@ -56,7 +56,7 @@ export default {
password: this.password,
});
this.show = false;
this.$emit('login-success'); // notifica al NavBar
this.$emit('login-success');
} catch (e) {
this.error = e.message ?? 'Error al iniciar sesión';
}

View File

@@ -1,29 +1,32 @@
<style scoped>
p {
font-size: 1.1rem;
color: #555;
}
</style>
<template>
<v-container class="d-flex flex-column align-center justify-center" style="height: 100vh;">
<v-progress-circular indeterminate color="primary" />
<p class="mt-4">Cerrando sesión</p>
</v-container>
</template>
<script>
import AuthService from '@/services/auth';
export default {
name: 'DonConfiao',
mounted() {
this.logout();
import AuthService from '@/services/auth';
export default {
name: 'DonConfiao',
mounted() {
this.logout();
},
methods: {
logout() {
AuthService.logout();
this.$router.push({
path: '/autenticarse'
});
},
methods: {
logout() {
AuthService.logout();
this.$router.push({
path: "/autenticarse"
});
},
},
};
},
};
</script>
<style scoped>
p {
font-size: 1.1rem;
color: #555;
}
</style>

View File

@@ -77,14 +77,14 @@
mounted() {
this.checkAuth();
},
watch: {
group () {
this.drawer = false
},
$route() {
this.checkAuth();
},
},
watch: {
group () {
this.drawer = false
},
$route() {
this.checkAuth();
},
},
methods: {
checkAuth() {
this.isAuthenticated = AuthService.isAuthenticated();

View File

@@ -16,9 +16,7 @@ class AuthService {
try {
const errData = await resp.json();
errMsg = errData?.detail ?? errData?.message ?? errMsg;
} catch (_) {
}
} catch (_) { /* ignore */ }
throw new Error(errMsg);
}