1 | package edu.ucsb.cs156.gauchoride.controllers; | |
2 | ||
3 | import io.swagger.v3.oas.annotations.tags.Tag; | |
4 | import io.swagger.v3.oas.annotations.Operation; | |
5 | ||
6 | import org.springframework.security.access.prepost.PreAuthorize; | |
7 | import org.springframework.web.bind.annotation.GetMapping; | |
8 | import org.springframework.web.bind.annotation.RequestMapping; | |
9 | import org.springframework.web.bind.annotation.RestController; | |
10 | ||
11 | import edu.ucsb.cs156.gauchoride.entities.User; | |
12 | import edu.ucsb.cs156.gauchoride.models.CurrentUser; | |
13 | import edu.ucsb.cs156.gauchoride.services.CurrentUserService; | |
14 | ||
15 | @Tag(name="Current User Information") | |
16 | @RequestMapping("/api/currentUser") | |
17 | @RestController | |
18 | public class UserInfoController extends ApiController { | |
19 | | |
20 | @Operation(summary = "Get information about current user") | |
21 | @PreAuthorize("hasRole('ROLE_USER')") | |
22 | @GetMapping("") | |
23 | public CurrentUser getCurrentUser() { | |
24 |
1
1. getCurrentUser : replaced return value with null for edu/ucsb/cs156/gauchoride/controllers/UserInfoController::getCurrentUser → KILLED |
return super.getCurrentUser(); |
25 | } | |
26 | } | |
Mutations | ||
24 |
1.1 |