forked from noxious/server
Almost finalised refactoring
This commit is contained in:
@ -8,7 +8,7 @@ type Payload = {
|
||||
|
||||
export default class MapDeleteEvent extends BaseEvent {
|
||||
public listen(): void {
|
||||
this.socket.on('gm:map_editor:map:delete', this.handleEvent.bind(this))
|
||||
this.socket.on('gm:map:delete', this.handleEvent.bind(this))
|
||||
}
|
||||
|
||||
private async handleEvent(data: Payload, callback: (response: boolean) => void): Promise<void> {
|
||||
@ -22,7 +22,7 @@ export default class MapDeleteEvent extends BaseEvent {
|
||||
this.logger.info(`Map ${data.mapId} deleted successfully.`)
|
||||
return callback(true)
|
||||
} catch (error: unknown) {
|
||||
this.logger.error('gm:map_editor:map:delete error', error)
|
||||
this.logger.error('gm:map:delete error', error)
|
||||
return callback(false)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user