fix: use json.Marshal for hx-vals in watchlist templates
This commit is contained in:
11
web/shared/hx_vals.go
Normal file
11
web/shared/hx_vals.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package shared
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
func HxVals(v map[string]interface{}) string {
|
||||
b, err := json.Marshal(v)
|
||||
if err != nil {
|
||||
return "{}"
|
||||
}
|
||||
return string(b)
|
||||
}
|
||||
Reference in New Issue
Block a user