Showing
3 changed files
with
4 additions
and
1 deletions
... | @@ -73,7 +73,6 @@ const loginUser = asyncHandler(async (req, res) => { | ... | @@ -73,7 +73,6 @@ const loginUser = asyncHandler(async (req, res) => { |
73 | // @route GET /api/users/self | 73 | // @route GET /api/users/self |
74 | // @access Private | 74 | // @access Private |
75 | const getSelf = asyncHandler(async (req, res) => { | 75 | const getSelf = asyncHandler(async (req, res) => { |
76 | - // TODO | ||
77 | res.status(200).json(req.user); | 76 | res.status(200).json(req.user); |
78 | }); | 77 | }); |
79 | 78 | ... | ... |
... | @@ -6,6 +6,9 @@ const connectDB = async () => { | ... | @@ -6,6 +6,9 @@ const connectDB = async () => { |
6 | const conn = await mongoose.connect(process.env.MONGO_URI); | 6 | const conn = await mongoose.connect(process.env.MONGO_URI); |
7 | console.log(`MongoDB Connected: ${conn.connection.host}`.cyan.underline); | 7 | console.log(`MongoDB Connected: ${conn.connection.host}`.cyan.underline); |
8 | } catch (error) { | 8 | } catch (error) { |
9 | + console.log( | ||
10 | + `Error occured while connecting to the mongoDB`.magenta.underline | ||
11 | + ); | ||
9 | console.log(error); | 12 | console.log(error); |
10 | process.exit(1); | 13 | process.exit(1); |
11 | } | 14 | } | ... | ... |
-
Please register or login to post a comment