feat: remove published status check when deleting lessons

Remove validation that prevented deletion of published lessons. Lessons can now be deleted regardless of their published status without requiring unpublishing first.
This commit is contained in:
JakkrapartXD 2026-02-02 14:34:17 +07:00
parent b7e4f45942
commit 7ac1a5af0a

View file

@ -565,11 +565,6 @@ export class ChaptersLessonService {
if (!lesson) throw new NotFoundError('Lesson not found');
// Check if lesson is published
if (lesson.is_published) {
throw new ValidationError('Cannot delete published lesson. Please unpublish first.');
}
// Delete attachment files from MinIO
if (lesson.attachments && lesson.attachments.length > 0) {
for (const attachment of lesson.attachments) {