diff --git a/main.go b/cmd/APP/main.go similarity index 70% rename from main.go rename to cmd/APP/main.go index 616bf92..6867ff8 100644 --- a/main.go +++ b/cmd/APP/main.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "github.com/gin-gonic/gin" "net/http" ) @@ -20,9 +21,17 @@ func main() { // 处理 webhook 数据 // 在这里,我们只是简单地打印出接收到的数据 - println("Received webhook:", json) + //println("Received webhook:", len(json)) - c.JSON(http.StatusOK, gin.H{"status": "received"}) + fmt.Printf("q: %v\n", json) + c.String(http.StatusBadRequest, "success") + }) + + router.GET("/q", func(c *gin.Context) { + c.JSON(http.StatusOK, gin.H{ + "sss": "sss", + }) + println("123") }) // 启动服务器