in edu-analytics-be/web/app/entity/studentEntity.js [84:97]
static async fetchStudentAnalytics(studentId) {
const sql = `SELECT * FROM student_analytics where studentId=${studentId};`;
const data = Object.values(JSON.parse(JSON.stringify(await query(sql))));
const respArray = [];
for (let i = 0; i < data.length; i++) {
const resobject = {
...data[i],
video: Object.values(JSON.parse(JSON.stringify(await this.getVideo(data[i].videoId))))[0],
}
respArray.push(resobject);
}
return respArray;
}