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) {
|
2021-04-27 08:29:09 +00:00
|
|
|
return this.findOneFromDef('zone', [routeId]);
|
2019-11-04 12:55:20 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
routeId: {
|
2022-01-17 11:44:43 +00:00
|
|
|
type: [Number, String],
|
2019-11-04 12:55:20 +00:00
|
|
|
required: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|