diff --git a/sports-matcher/client/src/pages/Login.js b/sports-matcher/client/src/pages/Login.js
index 650879e..a74018d 100644
--- a/sports-matcher/client/src/pages/Login.js
+++ b/sports-matcher/client/src/pages/Login.js
@@ -15,25 +15,27 @@ export default class Login extends React.Component {
render() {
return (
-
-
- Login
- Welcome back!
-
- E-mail
-
-
-
- Password
-
-
-
-
-
-
+
+
+
+ Login
+ Welcome back!
+
+ E-mail
+
+
+
+ Password
+
+
+
+
+
+
+
);
}
}
\ No newline at end of file
diff --git a/sports-matcher/scripts/start_mongo.sh b/sports-matcher/scripts/start_mongo.sh
index 0d12fdc..5786fc0 100755
--- a/sports-matcher/scripts/start_mongo.sh
+++ b/sports-matcher/scripts/start_mongo.sh
@@ -1,3 +1,3 @@
#!/bin/bash
-mongod --dbpath ./server/mongo-data
\ No newline at end of file
+mongod --dbpath ../server/mongo-data
\ No newline at end of file
diff --git a/sports-matcher/server/controllers/matchController.js b/sports-matcher/server/controllers/matchController.js
index 0ec8ed0..c4f02da 100644
--- a/sports-matcher/server/controllers/matchController.js
+++ b/sports-matcher/server/controllers/matchController.js
@@ -48,12 +48,12 @@ MatchController.get("/recent/:limit?", needDatabase, async (req, res) => {
}
let recent = null;
if (user) {
- await user.populate("participatingMatches");
+ await user.populate("participatingMatches").populate("participatingMatches.members.$");
recent = user.participatingMatches.slice(-limit);
} else {
- recent = await matchModel.find().where("publicity").gte(2).limit(limit).sort({ createDate: -1 });
+ recent = await matchModel.find().where("publicity").gte(2).limit(limit).sort({ createDate: -1 }).populate("members.$");
}
- await recent.populate("members.$"); // Populates all references.
+ await recent; // Populates all references.
res.status(200).send({ recent: recent });
} catch (error) {
console.error(error);