1
0
Fork 0
forked from forgejo/forgejo

[REFACTOR] webhook feishu endpoint

This commit is contained in:
oliverpool 2024-03-21 14:02:14 +01:00
parent 97f0ad49ff
commit 6b719f08d0
4 changed files with 15 additions and 36 deletions

View file

@ -292,18 +292,6 @@ func (f *NewGogshookForm) Validate(req *http.Request, errs binding.Errors) bindi
return middleware.Validate(errs, ctx.Data, f, ctx.Locale)
}
// NewFeishuHookForm form for creating feishu hook
type NewFeishuHookForm struct {
PayloadURL string `binding:"Required;ValidUrl"`
WebhookForm
}
// Validate validates the fields
func (f *NewFeishuHookForm) Validate(req *http.Request, errs binding.Errors) binding.Errors {
ctx := context.GetValidateContext(req)
return middleware.Validate(errs, ctx.Data, f, ctx.Locale)
}
// NewWechatWorkHookForm form for creating wechatwork hook
type NewWechatWorkHookForm struct {
PayloadURL string `binding:"Required;ValidUrl"`