summaryrefslogtreecommitdiffstats
path: root/store/sql_webhook_store.go
diff options
context:
space:
mode:
authorThomas Balthazar <tbalthazar@users.noreply.github.com>2016-05-31 16:51:28 +0200
committerChristopher Speller <crspeller@gmail.com>2016-05-31 10:51:28 -0400
commitc226cabc048a4e33e956346523e4605e85979d08 (patch)
tree563bb6536645b24ed378da4056b2f9f2bad40aea /store/sql_webhook_store.go
parent8f984771ae99e903f834236e24a1048d163a0ae6 (diff)
downloadchat-c226cabc048a4e33e956346523e4605e85979d08.tar.gz
chat-c226cabc048a4e33e956346523e4605e85979d08.tar.bz2
chat-c226cabc048a4e33e956346523e4605e85979d08.zip
PLT-2170 Send payload in application/json for outgoing webhooks (#3160)
* Send payload in application/json for outgoing webhooks The Add outgoing webhook UI now has a 'Content-Type' field that allows to choose between application/x-www-form-urlencoded and application/json. All outgoing webhooks created before this change will be considered as x-www-form-urlencoded. There's also a minor change in the way the outgoing webhook summary is displayed: the 'Callback URLs' label was missing. * Fix JS formatting errors * Increase ContentType field length to 128
Diffstat (limited to 'store/sql_webhook_store.go')
-rw-r--r--store/sql_webhook_store.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/store/sql_webhook_store.go b/store/sql_webhook_store.go
index 3c1f404e1..72897771d 100644
--- a/store/sql_webhook_store.go
+++ b/store/sql_webhook_store.go
@@ -33,6 +33,7 @@ func NewSqlWebhookStore(sqlStore *SqlStore) WebhookStore {
tableo.ColMap("CallbackURLs").SetMaxSize(1024)
tableo.ColMap("DisplayName").SetMaxSize(64)
tableo.ColMap("Description").SetMaxSize(128)
+ tableo.ColMap("ContentType").SetMaxSize(128)
}
return s
@@ -44,6 +45,7 @@ func (s SqlWebhookStore) UpgradeSchemaIfNeeded() {
s.CreateColumnIfNotExists("OutgoingWebhooks", "DisplayName", "varchar(64)", "varchar(64)", "")
s.CreateColumnIfNotExists("OutgoingWebhooks", "Description", "varchar(128)", "varchar(128)", "")
+ s.CreateColumnIfNotExists("OutgoingWebhooks", "ContentType", "varchar(128)", "varchar(128)", "")
}
func (s SqlWebhookStore) CreateIndexesIfNotExists() {