forked from noxious/server
#289: Add init command for easy installation
This commit is contained in:
@ -9,11 +9,6 @@ class ZoneManager {
|
||||
private readonly zones = new Map<number, LoadedZone>()
|
||||
|
||||
public async boot(): Promise<void> {
|
||||
// Create first zone if it doesn't exist
|
||||
if (!(await ZoneRepository.getById(1))) {
|
||||
await new ZoneService().createDemoZone()
|
||||
}
|
||||
|
||||
const zones = await ZoneRepository.getAll()
|
||||
await Promise.all(zones.map((zone) => this.loadZone(zone)))
|
||||
|
||||
|
Reference in New Issue
Block a user