{"version":3,"file":"_wUBmt6R.js","sources":["../../../../src/middleware/only-buyers.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 !== 'buyer') {\n return navigateTo('/401')\n }\n\n})"],"names":["onlyBuyers","defineNuxtRouteMiddleware","to","from","user","useState","navigateTo"],"mappings":"iDAEA,MAAAA,EAAeC,EAA0B,MAAOC,EAAIC,IAAS,CACnD,MAAAC,EAAOC,EAAsB,MAAM,EAErC,GAAA,CAACD,EAAK,OAAS,CAACA,EAAK,MAAM,MAAQA,EAAK,MAAM,OAAS,QACvD,OAAOE,EAAW,MAAM,CAGhC,CAAC"}