You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Backend: Connect the new users generated after they sign up to the database (5/26)
@PostMapping("/post")
publicResponseEntity<Object> postPerson(@RequestBodyPersonRequestpersonRequest) {
// A person object WITHOUT ID will create a new record with default roles as// studentPersonperson = newPerson(personRequest.getEmail(), personRequest.getPassword(), personRequest.getName(),
personRequest.getUsn(), personRequest.getSubjectsOfInterest());
personDetailsService.save(person);
returnnewResponseEntity<>(personRequest.getEmail() + " is created successfully", HttpStatus.CREATED);
}
Backend: Implement searching into the class creation feature based on subjects. (5/27)
Uses a SQL query to get the subjects of interest
// List<Person> findBySubjectsOfInterestContainingIgnoreCase(String subjectOfInterest);// CUSTOM QUERY METHOD TO GET A SUBJECT OF INTEREST@Query("SELECT p FROM Person p JOIN p.subjectsOfInterest s WHERE LOWER(s) = LOWER(:subjectOfInterest)")
List<Person> findBySubjectOfInterestIgnoreCase(@Param("subjectOfInterest") StringsubjectOfInterest);
@GetMapping("/getBySubject/{subjectOfInterest}")
publicResponseEntity<?> getPersonsBySubject(@PathVariableStringsubjectOfInterest) {
List<Person> personList = personDetailsService.getPersonsBySubjectOfInterest(subjectOfInterest);
// regardless of outcome, even if it's an empty list, it's still a valid outputreturnnewResponseEntity<>(personList, HttpStatus.OK);
}
Undo and Redo Stacks and Queues:
I tried to use backend for this method, but it didn't work out well so I have frontend
The text was updated successfully, but these errors were encountered:
My Demonstration for my features
Links:
Sign Up
Class Creation Feature
My checklist:
Uses a SQL query to get the subjects of interest
Undo and Redo Stacks and Queues:
The text was updated successfully, but these errors were encountered: