22 lines
461 B
JavaScript
Executable File
22 lines
461 B
JavaScript
Executable File
module.exports = {
|
|
name: 'zone',
|
|
async serverPrefetch() {
|
|
this.zone = await this.fetchZone(this.id);
|
|
|
|
if (!this.zone)
|
|
throw new Error('Something went wrong');
|
|
},
|
|
methods: {
|
|
fetchZone(id) {
|
|
return this.findOneFromDef('zone', [id]);
|
|
}
|
|
},
|
|
props: {
|
|
id: {
|
|
type: [Number, String],
|
|
required: true,
|
|
description: 'The zone id'
|
|
}
|
|
}
|
|
};
|