From 477207e34d146caeae043bc8acc1da42cf1e37c2 Mon Sep 17 00:00:00 2001 From: andig Date: Mon, 26 Apr 2021 12:38:44 +0200 Subject: [PATCH] Expose sponsor for ui --- cmd/root.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/root.go b/cmd/root.go index 0bf7938a9..f4b1bf787 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -13,6 +13,7 @@ import ( "github.com/andig/evcc/server/updater" "github.com/andig/evcc/util" "github.com/andig/evcc/util/pipe" + "github.com/andig/evcc/util/sponsor" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/spf13/cobra" @@ -208,6 +209,11 @@ func run(cmd *cobra.Command, args []string) { valueChan := make(chan util.Param) go tee.Run(valueChan) + // expose sponsor to UI + if sponsor.Subject != "" { + valueChan <- util.Param{Key: "sponsor", Val: sponsor.Subject} + } + // version check go updater.Run(log, httpd, tee, valueChan)