summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-09-01 00:16:14 +0800
committerUnknwon <joe2010xtmf@163.com>2014-09-01 00:16:14 +0800
commitbf5595f9a0ee41a30ab04348e02d87ee9f53969a (patch)
tree93f58ac671e7e9cf1b8b978772075db5dd74928b /modules
parent36661f53e6cb7bd5fe202157f794255d4d6932af (diff)
parent1ed67798acb532dd2e62d2f3cbdde7b34219bfec (diff)
downloadgitea-bf5595f9a0ee41a30ab04348e02d87ee9f53969a.tar.gz
gitea-bf5595f9a0ee41a30ab04348e02d87ee9f53969a.zip
Merge branch 'dev' of github.com:gogits/gogs into dev
Diffstat (limited to 'modules')
-rw-r--r--modules/auth/repo_form.go24
1 files changed, 19 insertions, 5 deletions
diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go
index 3eb0cbc564..5fd1114052 100644
--- a/modules/auth/repo_form.go
+++ b/modules/auth/repo_form.go
@@ -69,17 +69,31 @@ func (f *RepoSettingForm) Validate(ctx *macaron.Context, errs *binding.Errors, l
// \/ \/ \/ \/ \/ \/
type NewWebhookForm struct {
- PayloadUrl string `form:"payload_url" binding:"Required;Url"`
- ContentType string `form:"content_type" binding:"Required"`
- Secret string `form:"secret"`
- PushOnly bool `form:"push_only"`
- Active bool `form:"active"`
+ HookTaskType string `form:"hook_type" binding:"Required"`
+ PayloadUrl string `form:"payload_url" binding:"Required;Url"`
+ ContentType string `form:"content_type" binding:"Required"`
+ Secret string `form:"secret"`
+ PushOnly bool `form:"push_only"`
+ Active bool `form:"active"`
}
func (f *NewWebhookForm) Validate(ctx *macaron.Context, errs *binding.Errors, l i18n.Locale) {
validate(errs, ctx.Data, f, l)
}
+type NewSlackHookForm struct {
+ HookTaskType string `form:"hook_type" binding:"Required"`
+ Domain string `form:"domain" binding:"Required`
+ Token string `form:"token" binding:"Required"`
+ Channel string `form:"channel" binding:"Required"`
+ PushOnly bool `form:"push_only"`
+ Active bool `form:"active"`
+}
+
+func (f *NewSlackHookForm) Validate(ctx *macaron.Context, errs *binding.Errors, l i18n.Locale) {
+ validate(errs, ctx.Data, f, l)
+}
+
// .___
// | | ______ ________ __ ____
// | |/ ___// ___/ | \_/ __ \