1
0
forked from noxious/server

Map event tile improvements

This commit is contained in:
2025-01-05 06:22:22 +01:00
parent 57b21f1499
commit d7982493e1
23 changed files with 198 additions and 115 deletions

View File

@ -5,7 +5,10 @@ class WorldRepository extends BaseRepository {
async getFirst() {
try {
const repository = this.getEntityManager().getRepository(World)
return await repository.findOne({ date: { $exists: true } })
const result = await repository.findOne({ date: { $exists: true } })
if (result) result.setEntityManager(this.getEntityManager())
return result
} catch (error: any) {
this.logger.error(`Failed to get first world: ${error instanceof Error ? error.message : String(error)}`)
}