{"version":3,"file":"De2OFW-n.js","sources":["../../../../src/middleware/validate-update-car.ts"],"sourcesContent":["import {LISTINGS_SERVICE} from \"~/data/ServicesConstants\";\n\nexport default defineNuxtRouteMiddleware(async (to) => {\n if (import.meta.server) return\n try {\n console.log(to.params)\n const axiosRequest = await useNuxtApp().$getApi(LISTINGS_SERVICE)\n const {data} = await axiosRequest.get(`/listings/cars/${to.params.id}`)\n if (!data) {\n return navigateTo('/404')\n }\n const car = useState('car')\n car.value = data\n } catch (error) {\n console.log(error)\n return navigateTo('/404')\n }\n\n\n})"],"names":["validateUpdateCar","defineNuxtRouteMiddleware","to","__temp","__restore","axiosRequest","__executeAsync","useNuxtApp","LISTINGS_SERVICE","data","navigateTo","car","useState","error"],"mappings":"kEAGI,MAAwBA,EAAAC,EAAA,MAAAC,GAAA,CAAA,IAAAC,EAAAC,EAEZ,GAAA,CACR,QAAqB,IAAAF,EAAA,MAAA,EACf,MAAAG,GAAK,CAAAF,EAAAC,CAAA,EAAAE,EAAU,IAAAC,IAAiB,QAAkBC,CAAU,CAAA,EAAAL,iBACvD,CAAA,KAAAM,IAAA,CAAAN,EAAAC,CAAA,EAAAE,EAAA,IAAAD,EAAA,IAAA,kBAAAH,EAAA,OAAA,EAAA,EAAA,CAAA,EAAAC,EAAA,MAAAA,EAAAC,IAAAD,GACP,GAAA,CAAAM,EACJ,OAAAC,EAAA,MAAA,EAEA,MAAYC,EAAAC,EAAA,KAAA,UACAH,CACZ,OAAAI,EAAiB,CACjB,sBACJH,EAAA,MAAA,CAGH"}