From c293389359ca99c8d4e6b902bf56da605acc6458 Mon Sep 17 00:00:00 2001 From: hippoz Date: Mon, 9 Nov 2020 21:55:14 +0200 Subject: [PATCH] what have i done --- .gitignore | 5 +++++ api/v1/content.js | 2 +- config.js | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100755 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..9749b39 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +node_modules +node_modules/ +node_modules/* + +secret.js diff --git a/api/v1/content.js b/api/v1/content.js index 25e29aa..6fbae23 100755 --- a/api/v1/content.js +++ b/api/v1/content.js @@ -100,7 +100,7 @@ app.get('/category/:category/info', [ } const categoryId = req.params.category; - const category = await Category.findById(categoryId).populate('posts.creator'); + const category = await Category.findById(categoryId).populate('posts.creator', 'username _id'); if (!category) { res.status(404).json({ diff --git a/config.js b/config.js index 6cd61e0..da07d82 100755 --- a/config.js +++ b/config.js @@ -1,8 +1,8 @@ module.exports = { ports: { - mainServerPort: 25, + mainServerPort: 3000, }, - address: '188.25.251.46', + address: 'localhost', mongoUrl: 'mongodb://localhost:27017/app', bcryptRounds: 10, roleMap: {