Merge pull request #3 from ENSL/fix/slow-login

Fix for slow authentication
This commit is contained in:
Absurdon 2023-02-10 20:22:32 +01:00 committed by GitHub
commit 5fdbc3d0a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 9 deletions

View file

@ -28,7 +28,7 @@ services:
- "./public:/app/public" - "./public:/app/public"
init: true init: true
mongodb: mongodb:
image: "bitnami/mongodb:latest" image: "bitnami/mongodb:4.4"
container_name: ensl_gather_mongodb container_name: ensl_gather_mongodb
volumes: volumes:
- "./db/data:/bitnami/mongodb" - "./db/data:/bitnami/mongodb"
@ -36,3 +36,4 @@ services:
- MONGODB_USERNAME - MONGODB_USERNAME
- MONGODB_PASSWORD - MONGODB_PASSWORD
- MONGODB_DATABASE - MONGODB_DATABASE
- MONGODB_ROOT_PASSWORD=$MONGODB_PASSWORD

View file

@ -113,14 +113,6 @@ User.find = function (id, callback) {
user.profile = profile.toJson(); user.profile = profile.toJson();
return callback(null, profile); return callback(null, profile);
}); });
},
// Retrive Hive Stats
callback => {
hiveClient.getUserStatsV2(user, (error, response, userStats) => {
if (error || response.statusCode !== 200 || userStats.id === null) return callback();
_.assign(user.hive, userStats);
return callback(null, userStats);
});
} }
], function (error, result) { ], function (error, result) {
if (error) return callback(error); if (error) return callback(error);