Class UserInfoController
java.lang.Object
edu.ucsb.cs156.organic.controllers.ApiController
edu.ucsb.cs156.organic.controllers.UserInfoController
@RequestMapping("/api/currentUser")
@RestController
public class UserInfoController
extends ApiController
-
Constructor Summary
-
Method Summary
Methods inherited from class edu.ucsb.cs156.organic.controllers.ApiController
genericMessage, getCurrentUser, getMapper, handleAccessDeniedException, handleGenericException, handleIllegalArgumentException, mapperThatIgnoresMockitoMocks
-
Constructor Details
-
UserInfoController
public UserInfoController()
-
-
Method Details
-
getCurrentUserAsJson
@PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("") public org.springframework.http.ResponseEntity<String> getCurrentUserAsJson() throws com.fasterxml.jackson.core.JsonProcessingException- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
updateLastOnline
@PreAuthorize("hasRole(\'ROLE_USER\')") @PostMapping("/last-online") public org.springframework.http.ResponseEntity<Instant> updateLastOnline() -
getUsersEmails
-
getStaffedCourses
-