⚡Perfect: 统一返回格式

This commit is contained in:
2025-10-13 14:19:40 +08:00
parent ea837b6b94
commit 75687d45b9
@@ -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<String> handlePush(@RequestBody GiteaPushEvent event) {
log.info(event.toString());
hookService.handlePush(event);
return ResponseEntity.ok().build();
}
}