mirror of
https://github.com/jkaninda/mysql-bkup.git
synced 2025-12-06 13:39:41 +01:00
chore: notification remove MAIL_USERNAME and MAIL_PASSWORD from required env
Some checks failed
Build / docker (push) Failing after 13s
Some checks failed
Build / docker (push) Failing after 13s
This commit is contained in:
@@ -83,3 +83,13 @@ func backupReference() string {
|
||||
const templatePath = "/config/templates"
|
||||
|
||||
var DatabaseName = ""
|
||||
var vars = []string{
|
||||
"TG_TOKEN",
|
||||
"TG_CHAT_ID",
|
||||
}
|
||||
var mailVars = []string{
|
||||
"MAIL_HOST",
|
||||
"MAIL_PORT",
|
||||
"MAIL_FROM",
|
||||
"MAIL_TO",
|
||||
}
|
||||
|
||||
@@ -107,19 +107,6 @@ func sendMessage(msg string) error {
|
||||
}
|
||||
func NotifySuccess(notificationData *NotificationData) {
|
||||
notificationData.BackupReference = backupReference()
|
||||
var vars = []string{
|
||||
"TG_TOKEN",
|
||||
"TG_CHAT_ID",
|
||||
}
|
||||
var mailVars = []string{
|
||||
"MAIL_HOST",
|
||||
"MAIL_PORT",
|
||||
"MAIL_USERNAME",
|
||||
"MAIL_PASSWORD",
|
||||
"MAIL_FROM",
|
||||
"MAIL_TO",
|
||||
}
|
||||
|
||||
// Email notification
|
||||
err := CheckEnvVars(mailVars)
|
||||
if err == nil {
|
||||
@@ -147,18 +134,6 @@ func NotifySuccess(notificationData *NotificationData) {
|
||||
}
|
||||
}
|
||||
func NotifyError(error string) {
|
||||
var vars = []string{
|
||||
"TG_TOKEN",
|
||||
"TG_CHAT_ID",
|
||||
}
|
||||
var mailVars = []string{
|
||||
"MAIL_HOST",
|
||||
"MAIL_PORT",
|
||||
"MAIL_USERNAME",
|
||||
"MAIL_PASSWORD",
|
||||
"MAIL_FROM",
|
||||
"MAIL_TO",
|
||||
}
|
||||
|
||||
// Email notification
|
||||
err := CheckEnvVars(mailVars)
|
||||
|
||||
Reference in New Issue
Block a user