package com.eactive.testmaster.user.controller; import com.eactive.testmaster.common.util.SecurityUtil; import com.eactive.testmaster.user.entity.User; import org.springframework.http.ResponseEntity; import org.springframework.security.access.annotation.Secured; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class AccountApiController { public AccountApiController() { } @GetMapping("/api/account") @Secured("ROLE_API_TESTER") public ResponseEntity account(ModelMap model) { return ResponseEntity.ok().body(SecurityUtil.getCurrentUser()); } }