@@ -5,7 +5,7 @@ import { CreateLectureDto } from './dto/create-lecture.dto';
5
5
import { UpdateLectureDto } from './dto/update-lecture.dto' ;
6
6
import { WhiteboardLog } from './schema/whiteboard-log.schema' ;
7
7
import { WhiteboardEventDto } from './dto/whiteboard-event.dto' ;
8
- import { LectureSubtitle } from './lecture-subtitle.schema' ;
8
+ import { LectureSubtitle } from './schema/ lecture-subtitle.schema' ;
9
9
import { Lecture } from './schema/lecture.schema' ;
10
10
import { EnterCode } from './schema/lecture-code.schema' ;
11
11
import { generateRandomNumber } from 'src/utils/GenerateUtils' ;
@@ -71,7 +71,7 @@ export class LectureService {
71
71
72
72
async saveWhiteBoardLog ( lecture : Lecture , whiteboardEventDto : WhiteboardEventDto ) {
73
73
const whiteboardLog = new this . whiteboardLogModel ( {
74
- objects : whiteboardEventDto . objects ,
74
+ objects : whiteboardEventDto . objects [ 'data' ] ,
75
75
viewport : whiteboardEventDto . viewport ,
76
76
eventTime : whiteboardEventDto . eventTime ,
77
77
width : whiteboardEventDto . width ,
@@ -102,7 +102,7 @@ export class LectureService {
102
102
async findLectureRecord ( id : Types . ObjectId ) {
103
103
const lecture = await this . lectureModel . findById ( id ) . exec ( ) ;
104
104
const logs = await this . findLogs ( lecture ) ;
105
- const subtitles = ( await this . lectureSubtitleModel . findOne ( { lecture_id : lecture } ) . exec ( ) ) . subtitle ;
105
+ const subtitles = ( await this . lectureSubtitleModel . findOne ( { lecture_id : lecture } ) . exec ( ) ) ? .subtitle ;
106
106
const audioFile = lecture . audio_file ;
107
107
return new LectureRecordDto ( logs , subtitles , audioFile ) ;
108
108
}
0 commit comments