Class UserInfoController

java.lang.Object
edu.ucsb.cs156.happiercows.controllers.ApiController
edu.ucsb.cs156.happiercows.controllers.UserInfoController

@RequestMapping("/api/currentUser") @RestController public class UserInfoController extends ApiController
  • Constructor Details

    • UserInfoController

      public UserInfoController()
  • Method Details

    • getCurrentUser

      @PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("") public CurrentUser getCurrentUser()
      Overrides:
      getCurrentUser in class ApiController
    • updateLastOnline

      @PreAuthorize("hasRole(\'ROLE_USER\')") @PostMapping("/last-online") public org.springframework.http.ResponseEntity<Instant> updateLastOnline()