Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vivek/backend branch #27

Closed
wants to merge 4 commits into from
Closed

Vivek/backend branch #27

wants to merge 4 commits into from

Conversation

vipvivek15
Copy link
Contributor

Getting list of students when opening a course functionality added

Copy link
Contributor

@nsalazar0429 nsalazar0429 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, reopen a new branch with latest dev. You are not supposed to have these two commits in your branch history

Screenshot 2024-04-22 at 12 31 51 AM

Comment on lines +52 to +56

@GetMapping("/{courseName}/students")
public List<User> getStudentsByCourseName(@PathVariable String courseName) {
return courseService.findStudentsByCourseName(courseName);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should not search by course name. Please, use a course.id.

There are scenarios where 2 course objects can have the same name

@@ -14,4 +14,6 @@ public interface CourseRepository extends MongoRepository<Course, String> {
List<Course> findByEnrolledStudent(String studentId);

List<Course> findByInstructor(String instructor);

List<Course> findByName(String name);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use courseId

Copy link
Contributor

@nsalazar0429 nsalazar0429 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix git history

Copy link
Contributor

@nsalazar0429 nsalazar0429 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix git history

@vipvivek15 vipvivek15 closed this May 2, 2024
@nsalazar0429 nsalazar0429 deleted the vivek/backend_branch branch May 9, 2024 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants