1 | package edu.ucsb.cs156.courses.controllers; | |
2 | ||
3 | import com.fasterxml.jackson.databind.JsonNode; | |
4 | import com.fasterxml.jackson.databind.ObjectMapper; | |
5 | import edu.ucsb.cs156.courses.entities.PSCourse; | |
6 | import edu.ucsb.cs156.courses.entities.PersonalSchedule; | |
7 | import edu.ucsb.cs156.courses.entities.User; | |
8 | import edu.ucsb.cs156.courses.errors.BadEnrollCdException; | |
9 | import edu.ucsb.cs156.courses.errors.EntityNotFoundException; | |
10 | import edu.ucsb.cs156.courses.models.CurrentUser; | |
11 | import edu.ucsb.cs156.courses.repositories.PSCourseRepository; | |
12 | import edu.ucsb.cs156.courses.repositories.PersonalScheduleRepository; | |
13 | import edu.ucsb.cs156.courses.services.UCSBCurriculumService; | |
14 | import io.swagger.v3.oas.annotations.Operation; | |
15 | import io.swagger.v3.oas.annotations.Parameter; | |
16 | import io.swagger.v3.oas.annotations.tags.Tag; | |
17 | import java.util.ArrayList; | |
18 | import java.util.Iterator; | |
19 | import java.util.Optional; | |
20 | import javax.validation.Valid; | |
21 | import lombok.extern.slf4j.Slf4j; | |
22 | import org.springframework.beans.factory.annotation.Autowired; | |
23 | import org.springframework.security.access.prepost.PreAuthorize; | |
24 | import org.springframework.web.bind.annotation.DeleteMapping; | |
25 | import org.springframework.web.bind.annotation.GetMapping; | |
26 | import org.springframework.web.bind.annotation.PostMapping; | |
27 | import org.springframework.web.bind.annotation.PutMapping; | |
28 | import org.springframework.web.bind.annotation.RequestBody; | |
29 | import org.springframework.web.bind.annotation.RequestMapping; | |
30 | import org.springframework.web.bind.annotation.RequestParam; | |
31 | import org.springframework.web.bind.annotation.RestController; | |
32 | ||
33 | @Tag(name = "PSCourse") | |
34 | @RequestMapping("/api/courses") | |
35 | @RestController | |
36 | @Slf4j | |
37 | public class PSCourseController extends ApiController { | |
38 | ||
39 | @Autowired PSCourseRepository coursesRepository; | |
40 | @Autowired PersonalScheduleRepository personalScheduleRepository; | |
41 | @Autowired UCSBCurriculumService ucsbCurriculumService; | |
42 | @Autowired ObjectMapper mapper; | |
43 | ||
44 | @Operation(summary = "List all courses (admin)") | |
45 | @PreAuthorize("hasRole('ROLE_ADMIN')") | |
46 | @GetMapping("/admin/all") | |
47 | public Iterable<PSCourse> allUsersCourses() { | |
48 | Iterable<PSCourse> courses = coursesRepository.findAll(); | |
49 |
1
1. allUsersCourses : replaced return value with Collections.emptyList for edu/ucsb/cs156/courses/controllers/PSCourseController::allUsersCourses → KILLED |
return courses; |
50 | } | |
51 | ||
52 | @Operation(summary = "List all courses (user)") | |
53 | @PreAuthorize("hasRole('ROLE_USER')") | |
54 | @GetMapping("/user/all") | |
55 | public Iterable<PSCourse> thisUsersCourses() { | |
56 | CurrentUser currentUser = getCurrentUser(); | |
57 | Iterable<PSCourse> courses = coursesRepository.findAllByUserId(currentUser.getUser().getId()); | |
58 |
1
1. thisUsersCourses : replaced return value with Collections.emptyList for edu/ucsb/cs156/courses/controllers/PSCourseController::thisUsersCourses → KILLED |
return courses; |
59 | } | |
60 | ||
61 | @Operation(summary = "List all courses for a specified psId (admin)") | |
62 | @PreAuthorize("hasRole('ROLE_ADMIN')") | |
63 | @GetMapping("/admin/psid/all") | |
64 | public Iterable<PSCourse> allCoursesForPsId(@Parameter(name = "psId") @RequestParam Long psId) { | |
65 | Iterable<PSCourse> courses = coursesRepository.findAllByPsId(psId); | |
66 |
1
1. allCoursesForPsId : replaced return value with Collections.emptyList for edu/ucsb/cs156/courses/controllers/PSCourseController::allCoursesForPsId → KILLED |
return courses; |
67 | } | |
68 | ||
69 | @Operation(summary = "List all courses for a specified psId (user)") | |
70 | @PreAuthorize("hasRole('ROLE_USER')") | |
71 | @GetMapping("/user/psid/all") | |
72 | public Iterable<PSCourse> thisUsersCoursesForPsId( | |
73 | @Parameter(name = "psId") @RequestParam Long psId) { | |
74 | User currentUser = getCurrentUser().getUser(); | |
75 | Iterable<PSCourse> courses = coursesRepository.findAllByPsIdAndUser(psId, currentUser); | |
76 |
1
1. thisUsersCoursesForPsId : replaced return value with Collections.emptyList for edu/ucsb/cs156/courses/controllers/PSCourseController::thisUsersCoursesForPsId → KILLED |
return courses; |
77 | } | |
78 | ||
79 | @Operation(summary = "Get a single course (admin)") | |
80 | @PreAuthorize("hasRole('ROLE_ADMIN')") | |
81 | @GetMapping("/admin") | |
82 | public PSCourse getCourseById_admin(@Parameter(name = "id") @RequestParam Long id) { | |
83 | PSCourse courses = | |
84 | coursesRepository | |
85 | .findById(id) | |
86 |
1
1. lambda$getCourseById_admin$0 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$getCourseById_admin$0 → KILLED |
.orElseThrow(() -> new EntityNotFoundException(PSCourse.class, id)); |
87 | ||
88 |
1
1. getCourseById_admin : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::getCourseById_admin → KILLED |
return courses; |
89 | } | |
90 | ||
91 | @Operation(summary = "Get a single course (user)") | |
92 | @PreAuthorize("hasRole('ROLE_USER')") | |
93 | @GetMapping("/user") | |
94 | public PSCourse getCourseById(@Parameter(name = "id") @RequestParam Long id) { | |
95 | User currentUser = getCurrentUser().getUser(); | |
96 | PSCourse courses = | |
97 | coursesRepository | |
98 | .findByIdAndUser(id, currentUser) | |
99 |
1
1. lambda$getCourseById$1 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$getCourseById$1 → KILLED |
.orElseThrow(() -> new EntityNotFoundException(PSCourse.class, id)); |
100 | ||
101 |
1
1. getCourseById : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::getCourseById → KILLED |
return courses; |
102 | } | |
103 | ||
104 | @Operation(summary = "Create a new course") | |
105 | @PreAuthorize("hasRole('ROLE_USER')") | |
106 | @PostMapping("/post") | |
107 | public ArrayList<PSCourse> postCourses( | |
108 | @Parameter(name = "enrollCd") @RequestParam String enrollCd, | |
109 | @Parameter(name = "psId") @RequestParam Long psId) | |
110 | throws Exception { | |
111 | CurrentUser currentUser = getCurrentUser(); | |
112 | log.info("currentUser={}", currentUser); | |
113 | ||
114 | PersonalSchedule checkPsId = | |
115 | personalScheduleRepository | |
116 | .findByIdAndUser(psId, currentUser.getUser()) | |
117 |
1
1. lambda$postCourses$2 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$postCourses$2 → KILLED |
.orElseThrow(() -> new EntityNotFoundException(PersonalSchedule.class, psId)); |
118 | ||
119 | String body = ucsbCurriculumService.getAllSections(enrollCd, checkPsId.getQuarter()); | |
120 |
1
1. postCourses : negated conditional → KILLED |
if (body.equals("{\"error\": \"401: Unauthorized\"}") |
121 |
1
1. postCourses : negated conditional → KILLED |
|| body.equals("{\"error\": \"Enroll code doesn't exist in that quarter.\"}")) { |
122 | throw new BadEnrollCdException(enrollCd); | |
123 | } | |
124 | ||
125 | String enrollCdPrimary = null; | |
126 | boolean hasSecondary = false; | |
127 | Iterator<JsonNode> it = mapper.readTree(body).path("classSections").elements(); | |
128 |
1
1. postCourses : negated conditional → KILLED |
while (it.hasNext()) { |
129 | JsonNode classSection = it.next(); | |
130 | String section = classSection.path("section").asText(); | |
131 |
1
1. postCourses : negated conditional → KILLED |
if (section.endsWith("00")) { |
132 | String currentEnrollCd = classSection.path("enrollCode").asText(); | |
133 | enrollCdPrimary = currentEnrollCd; | |
134 |
1
1. postCourses : negated conditional → KILLED |
if (hasSecondary) break; |
135 | } else { | |
136 | hasSecondary = true; | |
137 | } | |
138 | } | |
139 | ||
140 |
1
1. postCourses : negated conditional → KILLED |
if (enrollCdPrimary == null) { |
141 | enrollCdPrimary = enrollCd; | |
142 | hasSecondary = false; | |
143 | } | |
144 | ||
145 |
1
1. postCourses : negated conditional → KILLED |
if (coursesRepository.findByPsIdAndEnrollCd(psId, enrollCdPrimary).isPresent()) { |
146 | throw new IllegalArgumentException("class exists in schedule"); | |
147 | } | |
148 | ||
149 | ArrayList<PSCourse> savedCourses = new ArrayList<>(); | |
150 | ||
151 |
1
1. postCourses : negated conditional → KILLED |
if (!enrollCdPrimary.equals(enrollCd)) { |
152 | String enrollCdSecondary = enrollCd; | |
153 | PSCourse secondary = new PSCourse(); | |
154 |
1
1. postCourses : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setUser → KILLED |
secondary.setUser(currentUser.getUser()); |
155 |
1
1. postCourses : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setEnrollCd → KILLED |
secondary.setEnrollCd(enrollCdSecondary); |
156 |
1
1. postCourses : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setPsId → KILLED |
secondary.setPsId(psId); |
157 | PSCourse savedSecondary = coursesRepository.save(secondary); | |
158 | savedCourses.add(savedSecondary); | |
159 |
1
1. postCourses : negated conditional → KILLED |
} else if (hasSecondary) { |
160 | throw new IllegalArgumentException( | |
161 | enrollCd | |
162 | + " is for a course with sections; please add a specific section and the lecture will be automatically added"); | |
163 | } | |
164 | ||
165 | PSCourse primary = new PSCourse(); | |
166 |
1
1. postCourses : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setUser → KILLED |
primary.setUser(currentUser.getUser()); |
167 |
1
1. postCourses : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setEnrollCd → KILLED |
primary.setEnrollCd(enrollCdPrimary); |
168 |
1
1. postCourses : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setPsId → KILLED |
primary.setPsId(psId); |
169 | PSCourse savedPrimary = coursesRepository.save(primary); | |
170 | savedCourses.add(savedPrimary); | |
171 |
1
1. postCourses : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::postCourses → KILLED |
return savedCourses; |
172 | } | |
173 | ||
174 | @Operation(summary = "Delete a course (admin)") | |
175 | @PreAuthorize("hasRole('ROLE_ADMIN')") | |
176 | @DeleteMapping("/admin") | |
177 | public Object deleteCourses_Admin(@Parameter(name = "id") @RequestParam Long id) { | |
178 | PSCourse courses = | |
179 | coursesRepository | |
180 | .findById(id) | |
181 |
1
1. lambda$deleteCourses_Admin$3 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$deleteCourses_Admin$3 → KILLED |
.orElseThrow(() -> new EntityNotFoundException(PSCourse.class, id)); |
182 | ||
183 |
1
1. deleteCourses_Admin : removed call to edu/ucsb/cs156/courses/repositories/PSCourseRepository::delete → KILLED |
coursesRepository.delete(courses); |
184 | ||
185 |
1
1. deleteCourses_Admin : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses_Admin → KILLED |
return genericMessage("PSCourse with id %s deleted".formatted(id)); |
186 | } | |
187 | ||
188 | @Operation(summary = "Delete a course (user)") | |
189 | @PreAuthorize("hasRole('ROLE_USER')") | |
190 | @DeleteMapping("/user") | |
191 | public Object deleteCourses(@Parameter(name = "id") @RequestParam Long id) throws Exception { | |
192 | User currentUser = getCurrentUser().getUser(); | |
193 | PSCourse psCourse = | |
194 | coursesRepository | |
195 | .findByIdAndUser(id, currentUser) | |
196 |
1
1. lambda$deleteCourses$4 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$deleteCourses$4 → KILLED |
.orElseThrow(() -> new EntityNotFoundException(PSCourse.class, id)); |
197 | long psId = psCourse.getPsId(); | |
198 | PersonalSchedule checkPsId = | |
199 | personalScheduleRepository | |
200 | .findByIdAndUser(psId, currentUser) | |
201 |
1
1. lambda$deleteCourses$5 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$deleteCourses$5 → KILLED |
.orElseThrow(() -> new EntityNotFoundException(PersonalSchedule.class, psId)); |
202 | ||
203 | String body = | |
204 | ucsbCurriculumService.getAllSections(psCourse.getEnrollCd(), checkPsId.getQuarter()); | |
205 |
1
1. deleteCourses : negated conditional → KILLED |
if (body.equals("{\"error\": \"401: Unauthorized\"}") |
206 |
1
1. deleteCourses : negated conditional → KILLED |
|| body.equals("{\"error\": \"Enroll code doesn't exist in that quarter.\"}")) { |
207 |
1
1. deleteCourses : removed call to edu/ucsb/cs156/courses/repositories/PSCourseRepository::delete → KILLED |
coursesRepository.delete(psCourse); |
208 |
1
1. deleteCourses : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses → KILLED |
return genericMessage("PSCourse with id %s deleted".formatted(id)); |
209 | } | |
210 | ||
211 | Iterator<JsonNode> it = mapper.readTree(body).path("classSections").elements(); | |
212 | Optional<Long> primaryId = Optional.empty(); | |
213 | Optional<Long> secondaryId = Optional.empty(); | |
214 |
1
1. deleteCourses : negated conditional → KILLED |
while (it.hasNext()) { |
215 | JsonNode classSection = it.next(); | |
216 | String section = classSection.path("section").asText(); | |
217 | String currentEnrollCd = classSection.path("enrollCode").asText(); | |
218 | Optional<PSCourse> currentPsCourse = | |
219 | coursesRepository.findByPsIdAndEnrollCd(psId, currentEnrollCd); | |
220 |
1
1. deleteCourses : negated conditional → KILLED |
if (!currentPsCourse.isPresent()) continue; |
221 | Optional<Long> idOpt = Optional.of(currentPsCourse.get().getId()); | |
222 |
1
1. deleteCourses : negated conditional → KILLED |
if (section.endsWith("00")) primaryId = idOpt; |
223 | else secondaryId = idOpt; | |
224 |
1
1. deleteCourses : removed call to edu/ucsb/cs156/courses/repositories/PSCourseRepository::delete → KILLED |
coursesRepository.delete(currentPsCourse.get()); |
225 | } | |
226 | ||
227 |
2
1. deleteCourses : negated conditional → KILLED 2. deleteCourses : negated conditional → KILLED |
if (primaryId.isPresent() && secondaryId.isPresent()) { |
228 |
1
1. deleteCourses : negated conditional → KILLED |
if (primaryId.get() == id) |
229 |
1
1. deleteCourses : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses → KILLED |
return genericMessage( |
230 | "PSCourse with id %s and matching secondary with id %s deleted" | |
231 | .formatted(id, secondaryId.get())); | |
232 | else | |
233 |
1
1. deleteCourses : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses → KILLED |
return genericMessage( |
234 | "PSCourse with id %s and matching primary with id %s deleted" | |
235 | .formatted(id, primaryId.get())); | |
236 | } | |
237 | ||
238 |
1
1. deleteCourses : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses → KILLED |
return genericMessage("PSCourse with id %s deleted".formatted(id)); |
239 | } | |
240 | ||
241 | @Operation(summary = "Delete a course with psid and enroll code (user)") | |
242 | @PreAuthorize("hasRole('ROLE_USER')") | |
243 | @DeleteMapping("/user/psid") | |
244 | public Object deleteCourses_PSID( | |
245 | @Parameter(name = "enrollCd") @RequestParam String enrollCd, | |
246 | @Parameter(name = "psId") @RequestParam Long psId) | |
247 | throws Exception { | |
248 | User currentUser = getCurrentUser().getUser(); | |
249 | ||
250 | PSCourse psCourse = | |
251 | coursesRepository | |
252 | .findByPsIdAndEnrollCd(psId, enrollCd) | |
253 | .orElseThrow( | |
254 | () -> | |
255 |
1
1. lambda$deleteCourses_PSID$6 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$deleteCourses_PSID$6 → KILLED |
new EntityNotFoundException( |
256 | PSCourse.class, "psId", psId, "enrollCode", enrollCd)); | |
257 | long id = psCourse.getId(); | |
258 | PersonalSchedule checkPsId = | |
259 | personalScheduleRepository | |
260 | .findByIdAndUser(psId, currentUser) | |
261 |
1
1. lambda$deleteCourses_PSID$7 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$deleteCourses_PSID$7 → KILLED |
.orElseThrow(() -> new EntityNotFoundException(PersonalSchedule.class, psId)); |
262 | ||
263 | String body = | |
264 | ucsbCurriculumService.getAllSections(psCourse.getEnrollCd(), checkPsId.getQuarter()); | |
265 |
1
1. deleteCourses_PSID : negated conditional → KILLED |
if (body.equals("{\"error\": \"401: Unauthorized\"}") |
266 |
1
1. deleteCourses_PSID : negated conditional → KILLED |
|| body.equals("{\"error\": \"Enroll code doesn't exist in that quarter.\"}")) { |
267 |
1
1. deleteCourses_PSID : removed call to edu/ucsb/cs156/courses/repositories/PSCourseRepository::delete → KILLED |
coursesRepository.delete(psCourse); |
268 |
1
1. deleteCourses_PSID : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses_PSID → KILLED |
return genericMessage( |
269 | "PSCourse with psId %s and enroll code %s deleted".formatted(psId, enrollCd)); | |
270 | } | |
271 | ||
272 | Iterator<JsonNode> it = mapper.readTree(body).path("classSections").elements(); | |
273 | Optional<Long> primaryId = Optional.empty(); | |
274 | Optional<Long> secondaryId = Optional.empty(); | |
275 |
1
1. deleteCourses_PSID : negated conditional → KILLED |
while (it.hasNext()) { |
276 | JsonNode classSection = it.next(); | |
277 | String section = classSection.path("section").asText(); | |
278 | String currentEnrollCd = classSection.path("enrollCode").asText(); | |
279 | Optional<PSCourse> currentPsCourse = | |
280 | coursesRepository.findByPsIdAndEnrollCd(psId, currentEnrollCd); | |
281 |
1
1. deleteCourses_PSID : negated conditional → KILLED |
if (!currentPsCourse.isPresent()) continue; |
282 | Optional<Long> idOpt = Optional.of(currentPsCourse.get().getId()); | |
283 |
1
1. deleteCourses_PSID : negated conditional → KILLED |
if (section.endsWith("00")) primaryId = idOpt; |
284 | else secondaryId = idOpt; | |
285 |
1
1. deleteCourses_PSID : removed call to edu/ucsb/cs156/courses/repositories/PSCourseRepository::delete → KILLED |
coursesRepository.delete(currentPsCourse.get()); |
286 | } | |
287 | ||
288 |
2
1. deleteCourses_PSID : negated conditional → KILLED 2. deleteCourses_PSID : negated conditional → KILLED |
if (primaryId.isPresent() && secondaryId.isPresent()) { |
289 |
1
1. deleteCourses_PSID : negated conditional → KILLED |
if (primaryId.get() == id) |
290 |
1
1. deleteCourses_PSID : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses_PSID → KILLED |
return genericMessage( |
291 | "PSCourse with id %s and matching secondary with id %s deleted" | |
292 | .formatted(id, secondaryId.get())); | |
293 | else | |
294 |
1
1. deleteCourses_PSID : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses_PSID → KILLED |
return genericMessage( |
295 | "PSCourse with id %s and matching primary with id %s deleted" | |
296 | .formatted(id, primaryId.get())); | |
297 | } | |
298 | ||
299 |
1
1. deleteCourses_PSID : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses_PSID → KILLED |
return genericMessage( |
300 | "PSCourse with psId %s and enroll code %s deleted".formatted(psId, enrollCd)); | |
301 | } | |
302 | ||
303 | @Operation(summary = "Update a single Course (admin)") | |
304 | @PreAuthorize("hasRole('ROLE_ADMIN')") | |
305 | @PutMapping("/admin") | |
306 | public PSCourse putCourseById_admin( | |
307 | @Parameter(name = "id") @RequestParam Long id, @RequestBody @Valid PSCourse incomingCourses) { | |
308 | PSCourse courses = | |
309 | coursesRepository | |
310 | .findById(id) | |
311 |
1
1. lambda$putCourseById_admin$8 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$putCourseById_admin$8 → KILLED |
.orElseThrow(() -> new EntityNotFoundException(PSCourse.class, id)); |
312 | ||
313 |
1
1. putCourseById_admin : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setEnrollCd → KILLED |
courses.setEnrollCd(incomingCourses.getEnrollCd()); |
314 |
1
1. putCourseById_admin : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setPsId → KILLED |
courses.setPsId(incomingCourses.getPsId()); |
315 | ||
316 | coursesRepository.save(courses); | |
317 | ||
318 |
1
1. putCourseById_admin : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::putCourseById_admin → KILLED |
return courses; |
319 | } | |
320 | ||
321 | @Operation(summary = "Update a single course (user)") | |
322 | @PreAuthorize("hasRole('ROLE_USER')") | |
323 | @PutMapping("/user") | |
324 | public PSCourse putCoursesById( | |
325 | @Parameter(name = "id") @RequestParam Long id, @RequestBody @Valid PSCourse incomingCourses) { | |
326 | User currentUser = getCurrentUser().getUser(); | |
327 | PSCourse courses = | |
328 | coursesRepository | |
329 | .findByIdAndUser(id, currentUser) | |
330 |
1
1. lambda$putCoursesById$9 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$putCoursesById$9 → KILLED |
.orElseThrow(() -> new EntityNotFoundException(PSCourse.class, id)); |
331 | ||
332 |
1
1. putCoursesById : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setEnrollCd → KILLED |
courses.setEnrollCd(incomingCourses.getEnrollCd()); |
333 |
1
1. putCoursesById : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setPsId → KILLED |
courses.setPsId(incomingCourses.getPsId()); |
334 | ||
335 | coursesRepository.save(courses); | |
336 | ||
337 |
1
1. putCoursesById : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::putCoursesById → KILLED |
return courses; |
338 | } | |
339 | } | |
Mutations | ||
49 |
1.1 |
|
58 |
1.1 |
|
66 |
1.1 |
|
76 |
1.1 |
|
86 |
1.1 |
|
88 |
1.1 |
|
99 |
1.1 |
|
101 |
1.1 |
|
117 |
1.1 |
|
120 |
1.1 |
|
121 |
1.1 |
|
128 |
1.1 |
|
131 |
1.1 |
|
134 |
1.1 |
|
140 |
1.1 |
|
145 |
1.1 |
|
151 |
1.1 |
|
154 |
1.1 |
|
155 |
1.1 |
|
156 |
1.1 |
|
159 |
1.1 |
|
166 |
1.1 |
|
167 |
1.1 |
|
168 |
1.1 |
|
171 |
1.1 |
|
181 |
1.1 |
|
183 |
1.1 |
|
185 |
1.1 |
|
196 |
1.1 |
|
201 |
1.1 |
|
205 |
1.1 |
|
206 |
1.1 |
|
207 |
1.1 |
|
208 |
1.1 |
|
214 |
1.1 |
|
220 |
1.1 |
|
222 |
1.1 |
|
224 |
1.1 |
|
227 |
1.1 2.2 |
|
228 |
1.1 |
|
229 |
1.1 |
|
233 |
1.1 |
|
238 |
1.1 |
|
255 |
1.1 |
|
261 |
1.1 |
|
265 |
1.1 |
|
266 |
1.1 |
|
267 |
1.1 |
|
268 |
1.1 |
|
275 |
1.1 |
|
281 |
1.1 |
|
283 |
1.1 |
|
285 |
1.1 |
|
288 |
1.1 2.2 |
|
289 |
1.1 |
|
290 |
1.1 |
|
294 |
1.1 |
|
299 |
1.1 |
|
311 |
1.1 |
|
313 |
1.1 |
|
314 |
1.1 |
|
318 |
1.1 |
|
330 |
1.1 |
|
332 |
1.1 |
|
333 |
1.1 |
|
337 |
1.1 |