Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ttrubinov committed Jun 22, 2024
1 parent 755cac5 commit 990fe70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
Expand Down Expand Up @@ -45,7 +46,7 @@ public ResponseEntity<TeacherResponseDTO> addTeacher(@RequestParam("name") Strin
@PostMapping("/wishes")
public ResponseEntity<TeacherResponseDTO> addTeacherWish(
@RequestParam("name") String teacherName,
@RequestParam("teacherWish") TeacherWishDto teacherWish
@RequestBody TeacherWishDto teacherWish
) {
return ResponseEntity.ok(new TeacherResponseDTO(teacherService.addTeacherWish(teacherName, teacherWish)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public record TeacherResponseDTO(
@JsonProperty("name") String name,
// List<SubjectPlanDTO> possibleSubjects,
List<LessonDTO> lessons,
List<TeacherWishDto> teacherWishDtos
List<TeacherWishDto> teacherWishes
) {
public TeacherResponseDTO(Teacher teacher) {
this(
Expand Down

0 comments on commit 990fe70

Please sign in to comment.