From 75687d45b960030994396509b2e9991add78540e Mon Sep 17 00:00:00 2001 From: Wonder Date: Mon, 13 Oct 2025 14:19:40 +0800 Subject: [PATCH] =?UTF-8?q?=20=E2=9A=A1Perfect:=20=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/hezhaohui/webhook/controller/HookController.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gitea-webhook/src/main/java/cn/hezhaohui/webhook/controller/HookController.java b/gitea-webhook/src/main/java/cn/hezhaohui/webhook/controller/HookController.java index ce1b36e..1a3097e 100644 --- a/gitea-webhook/src/main/java/cn/hezhaohui/webhook/controller/HookController.java +++ b/gitea-webhook/src/main/java/cn/hezhaohui/webhook/controller/HookController.java @@ -4,6 +4,8 @@ import cn.hezhaohui.webhook.entity.GiteaPushEvent; import cn.hezhaohui.webhook.service.HookService; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; +import org.springframework.http.HttpStatusCode; +import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -19,9 +21,9 @@ public class HookController { private HookService hookService; @PostMapping - public void handlePush(@RequestBody GiteaPushEvent event) { + public ResponseEntity handlePush(@RequestBody GiteaPushEvent event) { log.info(event.toString()); - hookService.handlePush(event); + return ResponseEntity.ok().build(); } }