{"version":3,"file":"BwfuNPDV.js","sources":["../../../../src/middleware/validate-update-property.ts"],"sourcesContent":["import {LISTINGS_SERVICE} from \"~/data/ServicesConstants\";\n\nexport default defineNuxtRouteMiddleware(async (to) => {\n if (import.meta.server) return\n try {\n const axiosRequest = await useNuxtApp().$getApi(LISTINGS_SERVICE)\n const {data} = await axiosRequest.get(`/listings/properties/${to.params.id}`)\n const property = useState('property')\n if (!data) {\n return navigateTo('/404')\n }\n property.value = data\n } catch (error) {\n console.log(error)\n return navigateTo('/404')\n }\n})"],"names":["validateUpdateProperty","defineNuxtRouteMiddleware","to","__temp","__restore","axiosRequest","__executeAsync","useNuxtApp","LISTINGS_SERVICE","data","property","useState","navigateTo","error"],"mappings":"uEAGI,MAAwBA,EAAAC,EAAA,MAAAC,GAAA,CAAA,IAAAC,EAAAC,EAEpB,GAAA,CACM,MAAAC,GAAK,CAAAF,EAAAC,CAAA,EAAAE,EAAU,IAAAC,IAAiB,QAAwBC,CAAA,CAAA,EAAUL,EAAA,eAClE,CAAA,KAAAM,OAA8BL,CAAA,EAAAE,EAAA,IAAAD,EAAA,IAAA,wBAAAH,EAAA,OAAA,EAAA,EAAA,CAAA,EAAAC,EAAA,MAAAA,EAAAC,IAAAD,GACzBO,EAAAC,EAAA,UAAA,EACP,GAAA,CAAAF,EACJ,OAAAG,EAAA,MAAA,IAEY,MAAAH,CACZ,OAAAI,EAAiB,CACjB,sBACJD,EAAA,MAAA,CACH"}