feat: 初步重构

This commit is contained in:
1808837298@qq.com
2024-02-29 01:08:18 +08:00
parent 1250041389
commit 1735981217
67 changed files with 2646 additions and 2243 deletions
+17
View File
@@ -0,0 +1,17 @@
package service
import (
"fmt"
"one-api/common"
"one-api/model"
)
func notifyRootUser(subject string, content string) {
if common.RootUserEmail == "" {
common.RootUserEmail = model.GetRootUserEmail()
}
err := common.SendEmail(subject, common.RootUserEmail, content)
if err != nil {
common.SysError(fmt.Sprintf("failed to send email: %s", err.Error()))
}
}