forked from noxious/server
Added getter & setter functions to all entities
This commit is contained in:
@ -6,7 +6,7 @@ class WorldRepository extends BaseRepository {
|
||||
async getFirst() {
|
||||
try {
|
||||
const repository = this.em.getRepository(World)
|
||||
return await repository.findOne({ date: { $exists: true }})
|
||||
return await repository.findOne({ date: { $exists: true } })
|
||||
} catch (error: any) {
|
||||
gameLogger.error(`Failed to get first world: ${error instanceof Error ? error.message : String(error)}`)
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ class ZoneRepository extends BaseRepository {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async getAll(): Promise<Zone[]> {
|
||||
try {
|
||||
const repository = this.em.getRepository(Zone)
|
||||
|
Reference in New Issue
Block a user