#289: Add init command for easy installation

This commit is contained in:
2024-12-22 21:51:33 +01:00
parent dd9e039649
commit 75333d2659
6 changed files with 279 additions and 37 deletions

View File

@ -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)))