1
0
forked from noxious/server

map editor

This commit is contained in:
Dennis Postma 2025-01-04 23:14:32 +01:00
parent 1dd0e73c4a
commit db7121a4fa
2 changed files with 4 additions and 2 deletions

View File

@ -23,7 +23,7 @@ export default class TileUpdateEvent extends BaseEvent {
if (!tile) return callback(false)
await tile.setName(data.name).setTags(data.tags).save()
return callback(true)
} catch (error) {
return callback(false)

View File

@ -15,7 +15,9 @@ export default class MapListEvent extends BaseEvent {
this.logger.info(`User ${(await this.getCharacter())!.getId()} has created a new map via map editor.`)
const maps = await MapRepository.getAll()
const mapRepository = new MapRepository()
const maps = await mapRepository.getAll()
return callback(maps)
} catch (error: any) {
this.logger.error('gm:map:list error', error.message)