update slack hook to use new format
This commit is contained in:
parent
d7ea49b9f5
commit
3794111460
4 changed files with 5 additions and 24 deletions
|
@ -16,8 +16,6 @@ const (
|
|||
)
|
||||
|
||||
type Slack struct {
|
||||
Domain string `json:"domain"`
|
||||
Token string `json:"token"`
|
||||
Channel string `json:"channel"`
|
||||
}
|
||||
|
||||
|
@ -36,14 +34,6 @@ type SlackAttachment struct {
|
|||
Text string `json:"text"`
|
||||
}
|
||||
|
||||
func GetSlackURL(domain string, token string) string {
|
||||
return fmt.Sprintf(
|
||||
"https://%s.slack.com/services/hooks/incoming-webhook?token=%s",
|
||||
domain,
|
||||
token,
|
||||
)
|
||||
}
|
||||
|
||||
func (p SlackPayload) GetJSONPayload() ([]byte, error) {
|
||||
data, err := json.Marshal(p)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue