This commit is contained in:
laodaming
2023-11-06 15:06:15 +08:00
parent 8c175ad9cc
commit deed8bb14c
2 changed files with 11 additions and 13 deletions

View File

@@ -1,7 +1,6 @@
package logic
import (
"encoding/json"
"fusenapi/utils/auth"
"fusenapi/utils/basic"
"net/http"
@@ -33,15 +32,7 @@ func NewTicketWebhookLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Tic
// }
func (l *TicketWebhookLogic) TicketWebhook(req *types.TicketWebhookReq, userinfo *auth.UserInfo, w http.ResponseWriter) (resp *basic.Response) {
//验证连接
if req.Type == "url_verification" {
challengeRsp := map[string]string{
"challenge": req.Challenge,
}
b, _ := json.Marshal(challengeRsp)
w.Write(b)
return
}
return resp.SetStatusWithMessage(basic.CodeOK, "success")
}