|
|
@@ -203,17 +203,6 @@ public class CourseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @PreAuthorize("hasRole('TEACHER') or hasRole('ADMIN')")
|
|
|
- @PutMapping("/enrollCode")
|
|
|
- public MyResponse updateEnrollCode(
|
|
|
- @AuthenticationPrincipal(expression = "id") Long userId,
|
|
|
- @RequestParam Long courseId,
|
|
|
- @RequestParam String enrollCode
|
|
|
- ) {
|
|
|
- CourseUpdateDTO updateDTO = new CourseUpdateDTO();
|
|
|
- updateDTO.setEnrollCode(enrollCode);
|
|
|
- return MyResponse.success(courseService.updateCourse(userId, courseId, updateDTO));
|
|
|
- }
|
|
|
|
|
|
/**
|
|
|
* 教师删除课程
|
|
|
@@ -306,13 +295,6 @@ public class CourseController {
|
|
|
return MyResponse.success(courseService.getEnrollmentsByStudent(page, studentId));
|
|
|
}
|
|
|
|
|
|
- @PreAuthorize("hasRole('TEACHER') or hasRole('ADMIN')")
|
|
|
- @GetMapping("/getEnrollCode")
|
|
|
- public MyResponse getEnrollCodeByCourseId(
|
|
|
- @AuthenticationPrincipal(expression = "id") Long userId,
|
|
|
- @RequestParam Long courseId) {
|
|
|
- return MyResponse.success(courseService.getEnrollCodeByCourseId(courseId));
|
|
|
- }
|
|
|
|
|
|
/**
|
|
|
* 学生退课
|