OOP is my passion ( ͡° ͜ʖ ͡°)
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
import { BaseEvent } from '#application/base/baseEvent'
|
||||
import Database from '#application/database'
|
||||
import { UUID } from '#application/types'
|
||||
import { Map } from '#entities/map'
|
||||
import MapRepository from '#repositories/mapRepository'
|
||||
import Database from '#application/database'
|
||||
|
||||
interface IPayload {
|
||||
mapId: UUID
|
||||
@ -26,14 +26,13 @@ export default class MapRequestEvent extends BaseEvent {
|
||||
|
||||
const map = await MapRepository.getById(data.mapId)
|
||||
|
||||
|
||||
if (!map) {
|
||||
this.logger.info(`User ${(await this.getCharacter())!.getId()} tried to request map ${data.mapId} but it does not exist.`)
|
||||
return callback(null)
|
||||
}
|
||||
|
||||
console.log(map)
|
||||
await Database.getEntityManager().populate(map, ['mapEventTiles', 'placedMapObjects'])
|
||||
// await Database.getEntityManager().populate(map, ['mapEventTiles', 'placedMapObjects'])
|
||||
|
||||
return callback(map)
|
||||
} catch (error: any) {
|
||||
|
Reference in New Issue
Block a user