Skip to content

Commit 027f235

Browse files
remove clgs
1 parent 885469c commit 027f235

File tree

6 files changed

+1
-16
lines changed

6 files changed

+1
-16
lines changed

config/db.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ const connectDB = async () => {
1111
useFindAndModify: true,
1212
});
1313

14-
console.log("MongoDB Connected...");
1514
} catch (err) {
1615
console.error(err.message);
17-
console.log("Server Error!");
1816
}
1917
};
2018

config/production.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"mongoURI": "mongodb+srv://aaditya:[email protected]/<dbname>?retryWrites=true&w=majority",
2+
"mongoURI": "mongodb+srv://aaditya:[email protected]/proddb?retryWrites=true&w=majority",
33
"jwt": "secret"
44
}

routes/post.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,9 @@ router.get("/all/:user_id", async (req, res) => {
7272
router.get("/real-all/:user_id", async (req, res) => {
7373
const user_id = req.params.user_id;
7474
try {
75-
// console.log(user_id);
7675
const user = await User.findOne({ _id: req.params.user_id });
7776
if (user) {
7877
posts = await Post.find({ user: user_id });
79-
// console.log(posts);
8078
return res.status(200).json(posts);
8179
} else {
8280
res.status(404).json({ errors: [{ msg: "No user Found" }] });
@@ -206,7 +204,6 @@ router.put("/comment/:user_id/:post_id", auth, async (req, res) => {
206204
res.status(201).send("post not found");
207205
}
208206
} catch (err) {
209-
console.log(err.message);
210207
res.send("Server Error!");
211208
}
212209
});
@@ -244,10 +241,8 @@ router.get("/:user/:post_id", auth, async (req, res) => {
244241
const liked = post.likes;
245242
return res.json(liked);
246243
} else {
247-
console.log("Nope!!");
248244
}
249245
} else {
250-
console.log("User not Found!!");
251246
}
252247
} catch (err) {
253248
console.error(err.message);

routes/saved.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ router.post("/:post_id", auth, async (req, res) => {
6161
res.send("No post found");
6262
}
6363
} catch (err) {
64-
console.log(err.message);
6564
res.send("Server Error!");
6665
}
6766
});
@@ -101,7 +100,6 @@ router.get("/", auth, async (req, res) => {
101100
res.json(toS);
102101
}
103102
} catch (err) {
104-
console.log(err.message);
105103
res.send("Server Error!");
106104
}
107105
});

routes/upload.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ const upload = multer({
3636
// @DESC upload post img
3737
// @ACCESS Private
3838
router.post("/", [auth, upload.single("file")], (req, res) => {
39-
console.log(req.file);
4039
cloudinary.v2.uploader.upload(
4140
req.file.path,
4241
{
@@ -46,7 +45,6 @@ router.post("/", [auth, upload.single("file")], (req, res) => {
4645
async (err, result) => {
4746
if (err) {
4847
res.json(err);
49-
console.log("First ERR ->>", err);
5048
} else {
5149
try {
5250
let post = new Post({
@@ -72,7 +70,6 @@ router.post("/", [auth, upload.single("file")], (req, res) => {
7270
// @DESC upload profile picture
7371
// @ACCESS Private
7472
router.post("/profile", [auth, upload.single("profile")], (req, res) => {
75-
console.log(req.file);
7673
cloudinary.v2.uploader.upload(
7774
req.file.path,
7875
{
@@ -82,7 +79,6 @@ router.post("/profile", [auth, upload.single("profile")], (req, res) => {
8279
async (err, result) => {
8380
if (err) {
8481
res.json(err);
85-
console.log(err);
8682
} else {
8783
let profile;
8884
try {
@@ -108,7 +104,6 @@ router.post("/profile", [auth, upload.single("profile")], (req, res) => {
108104
res.json(profile);
109105
}
110106
} catch (err) {
111-
console.log(err.message);
112107
res.send("Server Error!");
113108
}
114109
}

routes/user.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ router.post(
6868
}
6969
} catch (err) {
7070
console.error(err.message);
71-
console.log("Server Error!");
7271
}
7372
}
7473
);

0 commit comments

Comments
 (0)