{"version":3,"file":"lEpUDLsJ.js","sources":["../../../../src/middleware/only-cars.ts"],"sourcesContent":["import type {User} from \"~/models/services/User\";\n\nexport default defineNuxtRouteMiddleware(async (to, from) => {\n const user = useState('user');\n\n if (!user.value || !user.value.role || !user.value.role.includes('cars')) {\n return navigateTo('/401')\n }\n\n})"],"names":["onlyCars","defineNuxtRouteMiddleware","to","from","user","useState","navigateTo"],"mappings":"iDAEA,MAAAA,EAAeC,EAA0B,MAAOC,EAAIC,IAAS,CACnD,MAAAC,EAAOC,EAAsB,MAAM,EAEzC,GAAI,CAACD,EAAK,OAAS,CAACA,EAAK,MAAM,MAAQ,CAACA,EAAK,MAAM,KAAK,SAAS,MAAM,EACnE,OAAOE,EAAW,MAAM,CAGhC,CAAC"}