Skip to content

Commit

Permalink
granting currency fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
singharaj-usai committed Oct 16, 2024
1 parent eb7d2d7 commit f686dfe
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions server/functions/api/routes/currency.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ const moment = require('moment');

router.post('/claim-daily-currency', authenticateToken, async (req, res) => {
try {
const userId = req.user.userId;
const user = await User.findById(userId);
const user = await User.findOne({ userId: req.user.userId });
if (!user) {
return res.status(404).json({ error: 'User not found' });
}
Expand Down

0 comments on commit f686dfe

Please sign in to comment.