Skip to content

Commit

Permalink
hotfix(notify): 模版更新错误问题 (#135)
Browse files Browse the repository at this point in the history
附带增加邮件通知配置
  • Loading branch information
aide-cloud committed Apr 27, 2024
1 parent 3b18eaf commit 499d46c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions app/prom_server/configs/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,10 @@ interflow:
# groupId: prometheus-server
# endpoints:
# - host.docker.internal:9092

# 邮件配置
#email:
# host: smtp.163.com
# port: 25
# user: xxx@163.com
# pass: xxx
4 changes: 2 additions & 2 deletions app/prom_server/internal/biz/notify_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package biz
import (
"context"

"github.com/go-kratos/kratos/v2/log"
"github.com/aide-family/moon/app/prom_server/internal/biz/bo"
"github.com/aide-family/moon/app/prom_server/internal/biz/do"
"github.com/aide-family/moon/app/prom_server/internal/biz/do/basescopes"
"github.com/aide-family/moon/app/prom_server/internal/biz/repository"
"github.com/go-kratos/kratos/v2/log"
)

type NotifyTemplateBiz struct {
Expand Down Expand Up @@ -42,7 +42,7 @@ func (n *NotifyTemplateBiz) CreateTemplate(ctx context.Context, req *bo.NotifyTe

// UpdateTemplate 更新通知模板
func (n *NotifyTemplateBiz) UpdateTemplate(ctx context.Context, req *bo.NotifyTemplateUpdateBo) error {
updateParams, err := n.NotifyTemplateRepo.Get(ctx, basescopes.IdGT(req.Id))
updateParams, err := n.NotifyTemplateRepo.Get(ctx, basescopes.InIds(req.Id))
if err != nil {
return err
}
Expand Down

0 comments on commit 499d46c

Please sign in to comment.