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