| 1 | package edu.ucsb.cs156.gauchoride.controllers; | |
| 2 | ||
| 3 | import com.fasterxml.jackson.core.JsonProcessingException; | |
| 4 | import com.fasterxml.jackson.databind.ObjectMapper; | |
| 5 | ||
| 6 | import edu.ucsb.cs156.gauchoride.entities.User; | |
| 7 | import edu.ucsb.cs156.gauchoride.repositories.UserRepository; | |
| 8 | ||
| 9 | import edu.ucsb.cs156.gauchoride.errors.EntityNotFoundException; | |
| 10 | ||
| 11 | import edu.ucsb.cs156.gauchoride.services.GoogleCalendarService; | |
| 12 | ||
| 13 | import org.springframework.beans.factory.annotation.Autowired; | |
| 14 | import org.springframework.http.ResponseEntity; | |
| 15 | import org.springframework.security.access.prepost.PreAuthorize; | |
| 16 | import org.springframework.web.bind.annotation.DeleteMapping; | |
| 17 | import org.springframework.web.bind.annotation.GetMapping; | |
| 18 | import org.springframework.web.bind.annotation.PutMapping; | |
| 19 | import org.springframework.web.bind.annotation.PostMapping; | |
| 20 | import org.springframework.web.bind.annotation.RequestMapping; | |
| 21 | import org.springframework.web.bind.annotation.RequestParam; | |
| 22 | import org.springframework.web.bind.annotation.RestController; | |
| 23 | ||
| 24 | import io.swagger.v3.oas.annotations.tags.Tag; | |
| 25 | import io.swagger.v3.oas.annotations.Operation; | |
| 26 | import io.swagger.v3.oas.annotations.Parameter; | |
| 27 | ||
| 28 | @Tag(name = "Test Controller") | |
| 29 | @RequestMapping("/api/test") | |
| 30 | @RestController | |
| 31 | public class TestController extends ApiController{ | |
| 32 | ||
| 33 | @Autowired | |
| 34 | private GoogleCalendarService googleCalendarService; | |
| 35 | ||
| 36 | @Operation(summary = "Get a list of all drivers") | |
| 37 | @PreAuthorize("hasRole('ROLE_ADMIN')") | |
| 38 | @PostMapping("") | |
| 39 | public void testSharing(String email) throws Exception{ | |
| 40 |
1
1. testSharing : removed call to edu/ucsb/cs156/gauchoride/services/GoogleCalendarService::giveUserAdminAccess → NO_COVERAGE |
googleCalendarService.giveUserAdminAccess(email); |
| 41 | } | |
| 42 | } | |
Mutations | ||
| 40 |
1.1 |