2019-11-04 12:55:20 +00:00
|
|
|
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) {
|
2020-09-28 11:54:02 +00:00
|
|
|
return this.findOneFromDef('zone', {routeId});
|
2019-11-04 12:55:20 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
routeId: {
|
|
|
|
required: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|