Skip to content

Commit

Permalink
test: fix json to query paramter
Browse files Browse the repository at this point in the history
  • Loading branch information
yhames committed Aug 12, 2024
1 parent 6ac3853 commit 73b66a7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import gg.agenda.api.admin.agendateam.controller.request.AgendaTeamKeyReqDto;
import gg.agenda.api.admin.agendateam.controller.request.AgendaTeamUpdateDto;
import gg.agenda.api.admin.agendateam.controller.response.AgendaTeamDetailResDto;
import gg.agenda.api.admin.agendateam.controller.response.AgendaTeamResDto;
Expand Down Expand Up @@ -50,9 +49,8 @@ public ResponseEntity<List<AgendaTeamResDto>> agendaTeamList(@RequestParam("agen
}

@GetMapping
public ResponseEntity<AgendaTeamDetailResDto> agendaTeamDetail(
@ModelAttribute @Valid AgendaTeamKeyReqDto agendaTeamKeyReqDto) {
AgendaTeam agendaTeam = agendaTeamAdminService.getAgendaTeamByTeamKey(agendaTeamKeyReqDto.getTeamKey());
public ResponseEntity<AgendaTeamDetailResDto> agendaTeamDetail(@RequestParam("team_key") UUID agendaTeamKey) {
AgendaTeam agendaTeam = agendaTeamAdminService.getAgendaTeamByTeamKey(agendaTeamKey);
List<AgendaProfile> participants = agendaTeamAdminService.getAgendaProfileListByAgendaTeam(agendaTeam);
AgendaTeamDetailResDto agendaTeamDetailResDto = AgendaTeamDetailResDto.MapStruct.INSTANCE
.toDto(agendaTeam, participants);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import gg.admin.repo.agenda.AgendaAdminRepository;
import gg.admin.repo.agenda.AgendaTeamAdminRepository;
import gg.admin.repo.agenda.AgendaTeamProfileAdminRepository;
import gg.agenda.api.admin.agendateam.controller.request.AgendaTeamKeyReqDto;
import gg.agenda.api.admin.agendateam.controller.request.AgendaTeamMateReqDto;
import gg.agenda.api.admin.agendateam.controller.request.AgendaTeamUpdateDto;
import gg.agenda.api.admin.agendateam.controller.response.AgendaTeamDetailResDto;
Expand Down Expand Up @@ -163,7 +162,6 @@ void getAgendaTeamDetailAdminSuccess() throws Exception {
List<AgendaProfile> profiles = agendaProfileFixture.createAgendaProfileList(5);
profiles.forEach(profile -> agendaTeamProfileFixture
.createAgendaTeamProfile(agenda, team, profile));
AgendaTeamKeyReqDto agendaTeamKeyReqDto = new AgendaTeamKeyReqDto(team.getTeamKey());

// when
String response = mockMvc.perform(get("/agenda/admin/team")
Expand Down Expand Up @@ -210,7 +208,6 @@ void getAgendaTeamDetailAdminSuccessWithNoTeamMates() throws Exception {
// given
Agenda agenda = agendaFixture.createAgenda();
AgendaTeam team = agendaTeamFixture.createAgendaTeam(agenda);
AgendaTeamKeyReqDto agendaTeamKeyReqDto = new AgendaTeamKeyReqDto(team.getTeamKey());

// when
String response = mockMvc.perform(get("/agenda/admin/team")
Expand Down

0 comments on commit 73b66a7

Please sign in to comment.