From 69b72c23671a60bf07ea787efd1c0faaa5cd96e7 Mon Sep 17 00:00:00 2001 From: BlueBerrySoda Date: Fri, 3 May 2024 04:50:36 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20#119-=ED=97=AC=ED=8D=BC=20=EB=A7=A4?= =?UTF-8?q?=EC=B9=AD=EA=B8=80=20=EC=88=98=EC=A0=95=20Controller=20?= =?UTF-8?q?=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/help/controller/HelpController.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/back/src/main/java/com/example/capstone/domain/help/controller/HelpController.java b/back/src/main/java/com/example/capstone/domain/help/controller/HelpController.java index a55ed955de..fc5c65e421 100644 --- a/back/src/main/java/com/example/capstone/domain/help/controller/HelpController.java +++ b/back/src/main/java/com/example/capstone/domain/help/controller/HelpController.java @@ -46,5 +46,17 @@ public ResponseEntity> readHelp( .ok(new ApiResult<>("Successfully read help", helpResponse)); } + @PutMapping("/update") + @Operation(summary = "헬퍼글 수정", description = "request 정보를 기반으로 글을 수정합니다.") + @ApiResponse(responseCode = "200", description = "완료시 200을 리턴합니다.") + public ResponseEntity> updateHelp(/*@RequestHeader String token,*/ + @Parameter(description = "수정할 헬퍼글의 id와 헬퍼글의 request가 들어갑니다.", required = true) + @RequestBody HelpPutRequest request) { + String userId = UUID.randomUUID().toString();//jwtTokenProvider.extractUUID(token); + helpService.updateHelp(userId, request); + return ResponseEntity + .ok(new ApiResult<>("Successfully update help", 200)); + } + }