Small consistency changes

This commit is contained in:
Dennis Postma 2025-01-02 02:25:32 +01:00
parent f7dbf09bf5
commit 347554998a
3 changed files with 6 additions and 6 deletions

View File

@ -34,10 +34,10 @@ export default class TileUploadEvent extends BaseEvent {
await Promise.all(uploadPromises)
callback(true)
return callback(true)
} catch (error) {
this.logger.error('Error uploading tile:', error)
callback(false)
return callback(false)
}
}
}

View File

@ -28,11 +28,11 @@ export default class ZoneCreateEvent extends BaseEvent {
.save()
const zoneList = await ZoneRepository.getAll()
callback(zoneList)
return callback(zoneList)
} catch (error: any) {
this.logger.error('gm:zone_editor:zone:create error', error.message)
this.socket.emit('notification', { message: 'Failed to create zone.' })
callback([])
return callback([])
}
}
}

View File

@ -16,10 +16,10 @@ export default class ZoneListEvent extends BaseEvent {
this.logger.info(`User ${(await this.getCharacter())!.getId()} has created a new zone via zone editor.`)
const zones = await ZoneRepository.getAll()
callback(zones)
return callback(zones)
} catch (error: any) {
this.logger.error('gm:zone_editor:zone:list error', error.message)
callback([])
return callback([])
}
}
}