edit password functionality and page

This commit is contained in:
María
2025-08-14 15:26:33 +02:00
parent 61d96ac328
commit 51f49a2b7d
3 changed files with 32 additions and 8 deletions

View File

@@ -58,12 +58,12 @@ export default {
async fetch() {
const config = useRuntimeConfig()
try {
const response = await $fetch(`/my_user/`, {
await $fetch(`/my_user/`, {
baseURL: config.public.baseURL,
method: 'GET',
body: JSON.stringify(this.form),
})
console.log('User data fetched successfully:', response)
//console.log('User data fetched successfully:', response)
} catch (err) {
console.error('Error fetching user data:', err)
this.error = true
@@ -79,7 +79,6 @@ export default {
methods: {
...mapActions( useAuthStore, ['setUser']),
async submitUser() {
// TODO: configurar primero el estar logeado (estados, getters) para que peuda coger esa info y actualizarla
this.error = false
const config = useRuntimeConfig()
try {