Commit 3c13fb16 authored by janithgamage1.ed's avatar janithgamage1.ed

fix: update

parent 1bb4a269
...@@ -6,8 +6,7 @@ export const getUserSubscribedCurriculums = async (req, res) => { ...@@ -6,8 +6,7 @@ export const getUserSubscribedCurriculums = async (req, res) => {
try { try {
const userProgress = await UserProgress.find({ userId }) const userProgress = await UserProgress.find({ userId })
.populate('curriculumProgress.curriculumId') .populate('curriculumProgress.curriculumId')
.populate('curriculumProgress.tutorialProgress.tutorialId') .populate('curriculumProgress.tutorialProgress.tutorialId')
.populate('curriculumProgress.tutorialProgress.taskProgress.taskId');
res.status(200).json(userProgress); res.status(200).json(userProgress);
} catch (error) { } catch (error) {
......
...@@ -4,7 +4,7 @@ import { getUserSubscribedCurriculums, subscribeToCurriculum, updateUserProgress ...@@ -4,7 +4,7 @@ import { getUserSubscribedCurriculums, subscribeToCurriculum, updateUserProgress
const router = express.Router(); const router = express.Router();
router.get('/:userId', getUserSubscribedCurriculums); router.get('/:userId', getUserSubscribedCurriculums);
router.post('/:userId', subscribeToCurriculum); router.post('/', subscribeToCurriculum);
router.put('/:userId', updateUserProgress); router.put('/:userId', updateUserProgress);
export default router; export default router;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment