[REFACTOR] webhook matrix endpoints
This commit is contained in:
parent
e41e18f87e
commit
8dfbbfef07
16 changed files with 134 additions and 49 deletions
|
@ -371,20 +371,6 @@ func (f *NewTelegramHookForm) Validate(req *http.Request, errs binding.Errors) b
|
|||
return middleware.Validate(errs, ctx.Data, f, ctx.Locale)
|
||||
}
|
||||
|
||||
// NewMatrixHookForm form for creating Matrix hook
|
||||
type NewMatrixHookForm struct {
|
||||
HomeserverURL string `binding:"Required;ValidUrl"`
|
||||
RoomID string `binding:"Required"`
|
||||
MessageType int
|
||||
WebhookForm
|
||||
}
|
||||
|
||||
// Validate validates the fields
|
||||
func (f *NewMatrixHookForm) Validate(req *http.Request, errs binding.Errors) binding.Errors {
|
||||
ctx := context.GetValidateContext(req)
|
||||
return middleware.Validate(errs, ctx.Data, f, ctx.Locale)
|
||||
}
|
||||
|
||||
// NewMSTeamsHookForm form for creating MS Teams hook
|
||||
type NewMSTeamsHookForm struct {
|
||||
PayloadURL string `binding:"Required;ValidUrl"`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue