修复 「1.2.2 用户管理-用户列表勾选单一用户会全选 」 close #216
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/smtp"
|
||||
|
||||
"next-terminal/server/constant"
|
||||
@ -10,16 +11,11 @@ import (
|
||||
"github.com/jordan-wright/email"
|
||||
)
|
||||
|
||||
type MailService struct {
|
||||
propertyRepository *repository.PropertyRepository
|
||||
type mailService struct {
|
||||
}
|
||||
|
||||
func NewMailService(propertyRepository *repository.PropertyRepository) *MailService {
|
||||
return &MailService{propertyRepository: propertyRepository}
|
||||
}
|
||||
|
||||
func (r MailService) SendMail(to, subject, text string) {
|
||||
propertiesMap := r.propertyRepository.FindAllMap()
|
||||
func (r mailService) SendMail(to, subject, text string) {
|
||||
propertiesMap := repository.PropertyRepository.FindAllMap(context.TODO())
|
||||
host := propertiesMap[constant.MailHost]
|
||||
port := propertiesMap[constant.MailPort]
|
||||
username := propertiesMap[constant.MailUsername]
|
||||
|
Reference in New Issue
Block a user