bug: when clicked on any video in the history, it redirects to the main page
https://github.com/code100x/cms/assets/36275192/c0a8e9af-68e0-4cb7-84d3-948de7320c3b
the issue seems to be with the authorisation , please try to logout and login back again
Hey are you working on this??
no , go ahead @prajjwal2-3
Hi , unable to reproduce the issue on local.
Hi, I just checked it it is doing what it should be. Not able to reproduce on either online or local
it is a brave specific issue, when I watch a video in brave, the link doesn't open up, while when I watch a video in chrome, it does open up. But works fine locally....
After testing the watch history functionality a lot, I want to include the fact that this bug exist and it is doing that for some videos. I tried to find the bug in code but didn't get any luck but after exploring the network request for this specific functionality I got an idea why it is happening.
Watch history videos are being rendered by creating a dynamic URL using below code->
const { id: folderId, courses } = parent;
const courseId = courses[0].courseId;
const videoUrl = `/courses/${courseId}/${folderId}/${contentId}`;
parent object return the courses array where gives the courseId from which the video belongs to but for some videos the response is something like this ->
parent":{"id":267,"courses":[{"courseId":1,"contentId":267},{"courseId":2,"contentId":267},{"courseId":3,"contentId":267}]}
It gives an array of courses(I don't why) and it chooses the wrong courseId hence redirecting the website to dashboard.
@hkirat Can you check if my testing is correct about this issue. Seed data wasn't enough to further test but I am working on it right now, creating more dummy seed data.