chore: add backup prune, replace period flag by BACKUP_RETENTION_DAYS environment variable

This commit is contained in:
Jonas Kaninda
2024-10-20 06:52:36 +02:00
parent 3f7d28ea49
commit 2c6336e84a
9 changed files with 41 additions and 7 deletions

View File

@@ -6,7 +6,6 @@ import (
"encoding/json"
"fmt"
"github.com/go-mail/mail"
"github.com/robfig/cron/v3"
"html/template"
"io/ioutil"
"net/http"
@@ -177,7 +176,3 @@ func getTgUrl() string {
return fmt.Sprintf("https://api.telegram.org/bot%s", os.Getenv("TG_TOKEN"))
}
func IsValidCronExpression(cronExpr string) bool {
_, err := cron.ParseStandard(cronExpr)
return err == nil
}