Expose sponsor for ui

This commit is contained in:
andig 2021-04-26 12:38:44 +02:00
parent 7132d3005d
commit 477207e34d

View file

@ -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)