#28 style: fix lint issues in auth components
This commit is contained in:
@@ -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';
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
<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() {
|
||||
@@ -21,9 +17,16 @@ p {
|
||||
logout() {
|
||||
AuthService.logout();
|
||||
this.$router.push({
|
||||
path: "/autenticarse"
|
||||
path: '/autenticarse'
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
p {
|
||||
font-size: 1.1rem;
|
||||
color: #555;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user