#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: '/' }); this.$router.push({ path: '/' });
} catch (e) { } catch (e) {
// Si el servicio devuelve un error (ej. 401) lo convertimos en excepción
const msg = e?.response?.data?.message ?? e.message; const msg = e?.response?.data?.message ?? e.message;
this.error = msg ?? 'Error al iniciar sesión'; this.error = msg ?? 'Error al iniciar sesión';
} }

View File

@@ -56,7 +56,7 @@ export default {
password: this.password, password: this.password,
}); });
this.show = false; this.show = false;
this.$emit('login-success'); // notifica al NavBar this.$emit('login-success');
} catch (e) { } catch (e) {
this.error = e.message ?? 'Error al iniciar sesión'; 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> <template>
<v-container class="d-flex flex-column align-center justify-center" style="height: 100vh;"> <v-container class="d-flex flex-column align-center justify-center" style="height: 100vh;">
<v-progress-circular indeterminate color="primary" /> <v-progress-circular indeterminate color="primary" />
<p class="mt-4">Cerrando sesión</p> <p class="mt-4">Cerrando sesión</p>
</v-container> </v-container>
</template> </template>
<script> <script>
import AuthService from '@/services/auth'; import AuthService from '@/services/auth';
export default {
name: 'DonConfiao', export default {
mounted() { name: 'DonConfiao',
this.logout(); mounted() {
this.logout();
},
methods: {
logout() {
AuthService.logout();
this.$router.push({
path: '/autenticarse'
});
}, },
methods: { },
logout() { };
AuthService.logout();
this.$router.push({
path: "/autenticarse"
});
},
},
};
</script> </script>
<style scoped>
p {
font-size: 1.1rem;
color: #555;
}
</style>

View File

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

View File

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