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(); } }