Skip to content

Commit

Permalink
Removed console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
kyrea committed Jan 5, 2024
1 parent b535c92 commit 131f317
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/controllers/v4/internal/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@ import generateToken from '../../../modules/generateToken.js';
*/
const getUserProfile = async (req, res, next) => {
const key = req.headers.key;
console.log('Key: ' + key);
// Check for valid access key in headers
if (!key || key !== process.env.ACCESS_KEY) {
return res.status(401).json({
message: 'Unauthorized',
});
}
const user = await Users.findById(req.params.id);
console.log(user);
if (!user) {
return res.status(404).json({ message: 'User not found' }); // User not found
}
Expand Down

0 comments on commit 131f317

Please sign in to comment.