fuk it
This commit is contained in:
@ -4,6 +4,7 @@ import { Server } from 'socket.io'
|
||||
import { TSocket } from '../../../../utilities/types'
|
||||
import prisma from '../../../../utilities/prisma'
|
||||
import logger from '../../../../utilities/logger'
|
||||
import CharacterManager from '../../../../managers/characterManager'
|
||||
|
||||
type Payload = {
|
||||
id: string
|
||||
@ -24,7 +25,8 @@ export default class GMTileDeleteEvent {
|
||||
}
|
||||
|
||||
private async handleTileDelete(data: Payload, callback: (response: boolean) => void): Promise<void> {
|
||||
if (this.socket.character?.role !== 'gm') {
|
||||
const character = CharacterManager.getCharacterFromSocket(this.socket);
|
||||
if (character?.role !== 'gm') {
|
||||
callback(false)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user