Fix condition in track video lesson

This commit is contained in:
austinkelsay 2025-01-03 16:13:31 -06:00
parent 069b92d634
commit 17928584f0
No known key found for this signature in database
GPG Key ID: 44CB4EC6D9F2FA02

View File

@ -41,7 +41,7 @@ const useTrackVideoLesson = ({lessonId, videoDuration, courseId, videoPlayed, pa
decryptionPerformed
});
if (paidCourse === false || (paidCourse && decryptionPerformed)) {
if (!paidCourse || (paidCourse && decryptionPerformed)) {
console.log('📝 [useTrackVideoLesson] Creating new lesson entry');
await axios.post(`/api/users/${session.user.id}/lessons?courseId=${courseId}`, {
resourceId: lessonId,