22 lines
451 B
JavaScript
Executable File
22 lines
451 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,
|
|
required: true,
|
|
description: 'The zone id'
|
|
}
|
|
}
|
|
};
|