mirror of
https://github.com/usual2970/certimate.git
synced 2025-10-04 13:34:52 +00:00
feat(ui): new WorkflowNotifyNodeForm using antd
This commit is contained in:
@@ -73,8 +73,8 @@ func buildMsg(records []domain.Certificate) *domain.NotifyMessage {
|
||||
json.Unmarshal([]byte(setting.Content), &templates)
|
||||
|
||||
if templates != nil && len(templates.NotifyTemplates) > 0 {
|
||||
subject = templates.NotifyTemplates[0].Title
|
||||
message = templates.NotifyTemplates[0].Content
|
||||
subject = templates.NotifyTemplates[0].Subject
|
||||
message = templates.NotifyTemplates[0].Message
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -35,11 +35,11 @@ type NotifyTemplates struct {
|
||||
}
|
||||
|
||||
type NotifyTemplate struct {
|
||||
Title string `json:"title"`
|
||||
Content string `json:"content"`
|
||||
Subject string `json:"subject"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
type NotifyMessage struct {
|
||||
Subject string
|
||||
Message string
|
||||
Subject string `json:"subject"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
@@ -41,8 +41,8 @@ func (n *notifyNode) Run(ctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := notify.SendToChannel(n.node.GetConfigString("title"),
|
||||
n.node.GetConfigString("content"),
|
||||
if err := notify.SendToChannel(n.node.GetConfigString("subject"),
|
||||
n.node.GetConfigString("message"),
|
||||
n.node.GetConfigString("channel"),
|
||||
channelConfig,
|
||||
); err != nil {
|
||||
|
Reference in New Issue
Block a user