fix
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
package handler
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"fusenapi/server/feishu-sync/internal/svc"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest"
|
||||
)
|
||||
|
||||
func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Path: "/api/feishu/webhook",
|
||||
Handler: WebhookHandler(serverCtx),
|
||||
},
|
||||
},
|
||||
)
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"fusenapi/server/feishu-sync/internal/logic"
|
||||
"fusenapi/server/feishu-sync/internal/svc"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func WebhookHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
// 创建一个业务逻辑层实例
|
||||
l := logic.NewWebhookLogic(r.Context(), svcCtx)
|
||||
l.Webhook(w, r)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user