const db = require(`${appPath}/core/database`); module.exports = { name: 'zone', async serverPrefetch() { this.zone = await this.fetchZone(this.routeId); if (!this.zone) throw new Error('Something went wrong'); }, methods: { fetchZone(routeId) { return db.findOneFromDef('zone', {routeId}, __dirname); } }, props: { routeId: { required: true } } };