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

@ -6,7 +6,7 @@ interface IPayload {}
export default class MapListEvent extends BaseEvent {
public listen(): void {
this.socket.on('gm:map_editor:map:list', this.handleEvent.bind(this))
this.socket.on('gm:map:list', this.handleEvent.bind(this))
}
private async handleEvent(data: IPayload, callback: (response: Map[]) => void): Promise<void> {
@ -18,7 +18,7 @@ export default class MapListEvent extends BaseEvent {
const maps = await MapRepository.getAll()
return callback(maps)
} catch (error: any) {
this.logger.error('gm:map_editor:map:list error', error.message)
this.logger.error('gm:map:list error', error.message)
return callback([])
}
}