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.models.CurrentUser; | |
12 | ||
13 | @Tag(name="Current User Information") | |
14 | @RequestMapping("/api/currentUser") | |
15 | @RestController | |
16 | public class UserInfoController extends ApiController { | |
17 | | |
18 | @Operation(summary = "Get information about current user") | |
19 | @PreAuthorize("hasRole('ROLE_USER')") | |
20 | @GetMapping("") | |
21 | public CurrentUser getCurrentUser() { | |
22 |
1
1. getCurrentUser : replaced return value with null for edu/ucsb/cs156/gauchoride/controllers/UserInfoController::getCurrentUser → KILLED |
return super.getCurrentUser(); |
23 | } | |
24 | } | |
Mutations | ||
22 |
1.1 |