Skip to content

Commit

Permalink
Add test method
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony (Juntao) Hu committed Dec 5, 2021
1 parent c33f049 commit b7e8afb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/src/main/java/com/amigo/control/DatabaseController.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ public class DatabaseController {
return "Saved";
}

@GetMapping("/testaddcourse")
public @ResponseBody String testAddCourse() {
Course course = new Course("CSC101", "LEC0101", "TUT0101");
courseRepository.save(course);
return "Saved";
}

/**
* Returns all the courses saved in the database
*/
Expand Down

0 comments on commit b7e8afb

Please sign in to comment.