chore: build
ci-api / test (push) Successful in 28m19s

This commit is contained in:
Xor290
2026-10-26 20:58:30 +01:00
parent e9659854db
commit 5061095fe2
21 changed files with 1303 additions and 26 deletions
+12
View File
@@ -178,6 +178,9 @@ func main() {
Domain: cfg.VitrineDomain,
// Un client ne peut pas revendiquer un domaine d'Omnex (démos).
ReservedDomains: []string{cfg.DemoDomain},
// Incidents projets vers le Discord / Telegram de chaque admin (sans
// base, pas de réglages : l'alerte reste dans les logs).
Alert: projectAlert(alertRecipients),
})
go projectSvc.RunExpirationLoop(context.Background(), 5*time.Minute)
@@ -253,3 +256,12 @@ func main() {
log.Printf("extinction forcée après délai: %v", err)
}
}
// projectAlert adapte les destinataires d'alertes au hook Alert des projets.
// nil si aucun destinataire n'est résolvable (mode mémoire).
func projectAlert(recipients func(ctx context.Context) ([]alerts.Notifier, error)) func(string) {
if recipients == nil {
return nil
}
return func(message string) { alerts.Broadcast(recipients, message) }
}