Optimizer: re-run on vehicle changes and include unmodeled loads (#32681)
This commit is contained in:
parent
cc9bfc2556
commit
a237f698d0
10 changed files with 124 additions and 13 deletions
|
|
@ -191,6 +191,14 @@ func getHandler[T any](get func() T) http.HandlerFunc {
|
|||
}
|
||||
}
|
||||
|
||||
// callHandler invokes an api function without result
|
||||
func callHandler(fun func()) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
fun()
|
||||
jsonWrite(w, nil)
|
||||
}
|
||||
}
|
||||
|
||||
// updateSmartCostLimit sets the smart cost limit globally
|
||||
func updateSmartCostLimit(site site.API, setLimit func(loadpoint.API, *float64)) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue