From 72bb38e64478af2af2e348e60fe43b2fc0cd3196 Mon Sep 17 00:00:00 2001 From: dla0510 Date: Fri, 21 Jun 2024 16:54:37 +0900 Subject: [PATCH 1/3] =?UTF-8?q?ticket=20ep=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tiketeer/domain/ticket/controller/TicketController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/tiketeer/Tiketeer/domain/ticket/controller/TicketController.java b/src/main/java/com/tiketeer/Tiketeer/domain/ticket/controller/TicketController.java index 60ed8ef..4acb785 100644 --- a/src/main/java/com/tiketeer/Tiketeer/domain/ticket/controller/TicketController.java +++ b/src/main/java/com/tiketeer/Tiketeer/domain/ticket/controller/TicketController.java @@ -21,7 +21,7 @@ import jakarta.validation.Valid; @RestController -@RequestMapping("/ticketing/{ticketingId}/tickets") +@RequestMapping("/ticketings/{ticketingId}/tickets") public class TicketController { private final SecurityContextHelper securityContextHelper; private final CreateTicketUseCase createTicketUseCase; From 7b554677c5fff4aae90a5a1698b5ca0ab8f45b4b Mon Sep 17 00:00:00 2001 From: dla0510 Date: Fri, 21 Jun 2024 17:01:42 +0900 Subject: [PATCH 2/3] =?UTF-8?q?security=20=EA=B6=8C=ED=95=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/tiketeer/Tiketeer/auth/RequestMatcherHolder.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/tiketeer/Tiketeer/auth/RequestMatcherHolder.java b/src/main/java/com/tiketeer/Tiketeer/auth/RequestMatcherHolder.java index ca071aa..a92559a 100644 --- a/src/main/java/com/tiketeer/Tiketeer/auth/RequestMatcherHolder.java +++ b/src/main/java/com/tiketeer/Tiketeer/auth/RequestMatcherHolder.java @@ -27,6 +27,7 @@ public class RequestMatcherHolder { new RequestInfo(GET, "/members/*", RoleEnum.BUYER), new RequestInfo(GET, "/members", RoleEnum.BUYER), new RequestInfo(GET, "/members/*/purchases", RoleEnum.BUYER), + new RequestInfo(GET, "/members/*/purchases/*", RoleEnum.BUYER), new RequestInfo(GET, "/members/*/sale", RoleEnum.SELLER), new RequestInfo(POST, "/members/*/points", RoleEnum.BUYER), @@ -42,9 +43,13 @@ public class RequestMatcherHolder { new RequestInfo(PATCH, "/ticketings/*", RoleEnum.SELLER), new RequestInfo(DELETE, "/ticketings/*", RoleEnum.SELLER), + //ticket + new RequestInfo(POST, "/ticketings/*/tickets", RoleEnum.SELLER), + new RequestInfo(PUT, "/ticketings/*/tickets", RoleEnum.SELLER), + // purchase new RequestInfo(POST, "/purchases", RoleEnum.BUYER), - new RequestInfo(DELETE, "/purchases/*/tickets", RoleEnum.BUYER), + new RequestInfo(DELETE, "/purchases/*/items", RoleEnum.BUYER), // swagger new RequestInfo(GET, "/v3/api-docs/**", null), From 9a1fa5f7c2640b7c0a5592c350c3da32a223eb62 Mon Sep 17 00:00:00 2001 From: dla0510 Date: Fri, 21 Jun 2024 17:15:58 +0900 Subject: [PATCH 3/3] =?UTF-8?q?test=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/ticket/controller/TicketControllerTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/tiketeer/Tiketeer/domain/ticket/controller/TicketControllerTest.java b/src/test/java/com/tiketeer/Tiketeer/domain/ticket/controller/TicketControllerTest.java index fb91766..0c1a368 100644 --- a/src/test/java/com/tiketeer/Tiketeer/domain/ticket/controller/TicketControllerTest.java +++ b/src/test/java/com/tiketeer/Tiketeer/domain/ticket/controller/TicketControllerTest.java @@ -95,7 +95,7 @@ void postTicketSuccess() throws Exception { // when mockMvc - .perform(post("/api/ticketing/{ticketingId}/tickets", ticketing.getId()) + .perform(post("/api/ticketings/{ticketingId}/tickets", ticketing.getId()) .contextPath("/api") .contentType(MediaType.APPLICATION_JSON) .characterEncoding("utf-8") @@ -143,7 +143,7 @@ void putTicketSuccess() throws Exception { // when mockMvc - .perform(put("/api/ticketing/{ticketingId}/tickets", ticketing.getId()) + .perform(put("/api/ticketings/{ticketingId}/tickets", ticketing.getId()) .contextPath("/api") .contentType(MediaType.APPLICATION_JSON) .characterEncoding("utf-8")