wip migration

This commit is contained in:
María
2025-08-14 15:12:29 +02:00
commit 61d96ac328
148 changed files with 31438 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import cookie from 'cookie'
import { useAuthStore } from '~/stores/auth'
export default defineNuxtPlugin(() => {
const auth = useAuthStore()
try {
const cookies = cookie.parse(useRequestHeaders().cookie || '')
const authCookie = cookies['authentication-cookie']
if (authCookie) {
const parsed = JSON.parse(authCookie)
auth.setPayload(parsed.auth)
}
} catch (err) {
console.error('Failed to parse authentication cookie', err)
}
})