1
0
Fork 0
forked from forgejo/forgejo

[REFACTOR] add Icon to webhook.Interface

This commit is contained in:
oliverpool 2024-03-22 16:02:48 +01:00 committed by GitHub
parent 7f03fdf9f9
commit 84eeab59af
15 changed files with 54 additions and 2 deletions

View file

@ -6,6 +6,7 @@ package webhook
import (
"context"
"fmt"
"html/template"
"net/http"
"net/url"
"strings"
@ -22,6 +23,8 @@ type dingtalkHandler struct{}
func (dingtalkHandler) Type() webhook_module.HookType { return webhook_module.DINGTALK }
func (dingtalkHandler) Metadata(*webhook_model.Webhook) any { return nil }
func (dingtalkHandler) Icon(size int) template.HTML { return imgIcon("dingtalk.ico", size) }
func (dingtalkHandler) FormFields(bind func(any)) FormFields {
var form struct {
forms.WebhookForm