1
0
forked from noxious/server

More improvements

This commit is contained in:
2025-01-04 19:05:54 +01:00
parent 067976c54a
commit 9a448542d3
11 changed files with 38 additions and 184 deletions

View File

@ -12,9 +12,9 @@ export default class CharacterListEvent extends BaseEvent {
const characterRepository = new CharacterRepository()
let characters: Character[] = await characterRepository.getByUserId(this.socket.userId!)
// Populate characters with characterType and characterHair
await characterRepository.getEntityManager().populate(characters, ['characterType', 'characterHair'])
console.log(characters)
this.socket.emit('character:list', characters)
} catch (error: any) {
this.logger.error('character:list error', error.message)