Add information about populating LocationManager
This commit is contained in:
parent
503e8e34dd
commit
ceefef38df
|
@ -49,6 +49,8 @@ class LocationManager {
|
||||||
this.users.push(new User(user._id, user.username, user.email, user.createdAt, user.updatedAt, user.lastLogin));
|
this.users.push(new User(user._id, user.username, user.email, user.createdAt, user.updatedAt, user.lastLogin));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log(`Loaded ${users.length} users from database`);
|
||||||
|
|
||||||
const galaxies = await getAllGalaxies();
|
const galaxies = await getAllGalaxies();
|
||||||
for(const galaxy of galaxies) {
|
for(const galaxy of galaxies) {
|
||||||
const galaxyObject: Galaxy = {
|
const galaxyObject: Galaxy = {
|
||||||
|
@ -93,6 +95,8 @@ class LocationManager {
|
||||||
this.galaxies.push(galaxyObject);
|
this.galaxies.push(galaxyObject);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
console.log(`Loaded ${this.galaxies.length} galaxies from database`);
|
||||||
|
|
||||||
for(const user of this.users) {
|
for(const user of this.users) {
|
||||||
await user.init();
|
await user.init();
|
||||||
const userDB = users.find(u => u._id.equals(user.id));
|
const userDB = users.find(u => u._id.equals(user.id));
|
||||||
|
|
Loading…
Reference in New Issue