mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-18 17:46:37 +08:00
fix send ByAll
This commit is contained in:
parent
517f6ad211
commit
8f6b13c2fe
@ -12,6 +12,16 @@ const (
|
||||
)
|
||||
|
||||
func Notify(by string, title string, description string, content string) error {
|
||||
if by == ByAll {
|
||||
if err := SendEmail(title, config.RootUserEmail, content); err != nil {
|
||||
return fmt.Errorf("failed to send email: %v", err)
|
||||
}
|
||||
if err := SendMessage(title, description, content); err != nil {
|
||||
return fmt.Errorf("failed to send message: %v", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
if by == ByEmail {
|
||||
return SendEmail(title, config.RootUserEmail, content)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user