Class StudentAppUserController
java.lang.Object
com.markvarga21.studentmanager.controller.StudentAppUserController
@RestController
@RequestMapping("/api/v1/studentUser")
@CrossOrigin
public class StudentAppUserController
extends Object
The controller for the student application user.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Long>
getStudentIdByUsername
(String username) This method is used to get the student ID by the username.
-
Constructor Details
-
StudentAppUserController
public StudentAppUserController()
-
-
Method Details
-
getStudentIdByUsername
@PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("/{username}") public org.springframework.http.ResponseEntity<Long> getStudentIdByUsername(@PathVariable String username) This method is used to get the student ID by the username.- Parameters:
username
- The username of the student.- Returns:
- The found student ID.
-