diff options
author | techknowlogick <matti@mdranta.net> | 2019-04-18 22:45:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-18 22:45:02 -0400 |
commit | 56da256853001cf3538b8d4ae99798e084935a90 (patch) | |
tree | cdbd686d31750aa89365635eb96705c5a9fc1efc /modules/auth | |
parent | 6dbd26185203d464c4a4e32e7af04a34f37ae4f2 (diff) | |
download | gitea-56da256853001cf3538b8d4ae99798e084935a90.tar.gz gitea-56da256853001cf3538b8d4ae99798e084935a90.zip |
Telegram webhook (#4227)
Diffstat (limited to 'modules/auth')
-rw-r--r-- | modules/auth/repo_form.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go index 990a94dd63..d37a5b94d8 100644 --- a/modules/auth/repo_form.go +++ b/modules/auth/repo_form.go @@ -263,6 +263,18 @@ func (f *NewDingtalkHookForm) Validate(ctx *macaron.Context, errs binding.Errors return validate(errs, ctx.Data, f, ctx.Locale) } +// NewTelegramHookForm form for creating telegram hook +type NewTelegramHookForm struct { + BotToken string `binding:"Required"` + ChatID string `binding:"Required"` + WebhookForm +} + +// Validate validates the fields +func (f *NewTelegramHookForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { + return validate(errs, ctx.Data, f, ctx.Locale) +} + // .___ // | | ______ ________ __ ____ // | |/ ___// ___/ | \_/ __ \ |