Almost finalised refactoring

This commit is contained in:
2025-01-03 14:35:02 +01:00
parent fecdf222d7
commit a40b71140a
35 changed files with 257 additions and 410 deletions

View File

@ -10,7 +10,7 @@ type Payload = {
export default class MapCreateEvent extends BaseEvent {
public listen(): void {
this.socket.on('gm:map_editor:map:create', this.handleEvent.bind(this))
this.socket.on('gm:map:create', this.handleEvent.bind(this))
}
private async handleEvent(data: Payload, callback: (response: Map[]) => void): Promise<void> {
@ -30,7 +30,7 @@ export default class MapCreateEvent extends BaseEvent {
const mapList = await MapRepository.getAll()
return callback(mapList)
} catch (error: any) {
this.logger.error('gm:map_editor:map:create error', error.message)
this.logger.error('gm:map:create error', error.message)
this.socket.emit('notification', { message: 'Failed to create map.' })
return callback([])
}