Resolve merge conflicts and fix student course details functionality
This commit is contained in:
@@ -60,4 +60,4 @@ class StudentController {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = StudentController;
|
||||
module.exports = StudentController;
|
||||
|
||||
@@ -39,4 +39,4 @@ class Course {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Course;
|
||||
module.exports = Course;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const Score = require('../models/Score');
|
||||
const Student = require('../models/Student');
|
||||
|
||||
const Course = require('../models/Course');
|
||||
|
||||
class StudentService {
|
||||
@@ -23,10 +22,6 @@ class StudentService {
|
||||
}
|
||||
|
||||
static async getStudentGrades(userId) {
|
||||
// 先通过 userId 获取 studentId
|
||||
// 假设 users.id = students.id,或者通过 user_id 关联
|
||||
// 根据之前的 authService,我们假设 users.id 就是 students.id
|
||||
|
||||
// 确认学生是否存在
|
||||
const student = await Student.findById(userId);
|
||||
if (!student) {
|
||||
@@ -72,4 +67,4 @@ class StudentService {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = StudentService;
|
||||
module.exports = StudentService;
|
||||
|
||||
Reference in New Issue
Block a user