diff options
author | Daniel Grier <daniel.grier@gmail.com> | 2019-04-20 00:18:06 +1000 |
---|---|---|
committer | techknowlogick <matti@mdranta.net> | 2019-04-19 10:18:06 -0400 |
commit | b9d1fb6de32613ada3869d2a9692cb078ed48534 (patch) | |
tree | e02d62ed2bbe2c92cad02ef405316507dc8d120b /modules/auth | |
parent | 2af67f6044af1cad7136ce8c123e37ab090ca9bc (diff) | |
download | gitea-b9d1fb6de32613ada3869d2a9692cb078ed48534.tar.gz gitea-b9d1fb6de32613ada3869d2a9692cb078ed48534.zip |
Add support for MS Teams webhooks (#6632)
Diffstat (limited to 'modules/auth')
-rw-r--r-- | modules/auth/repo_form.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go index d37a5b94d8..fd6891288d 100644 --- a/modules/auth/repo_form.go +++ b/modules/auth/repo_form.go @@ -275,6 +275,17 @@ func (f *NewTelegramHookForm) Validate(ctx *macaron.Context, errs binding.Errors return validate(errs, ctx.Data, f, ctx.Locale) } +// NewMSTeamsHookForm form for creating MS Teams hook +type NewMSTeamsHookForm struct { + PayloadURL string `binding:"Required;ValidUrl"` + WebhookForm +} + +// Validate validates the fields +func (f *NewMSTeamsHookForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { + return validate(errs, ctx.Data, f, ctx.Locale) +} + // .___ // | | ______ ________ __ ____ // | |/ ___// ___/ | \_/ __ \ |