summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hub/src/spreadspace.org/sfive/s5srvWeb.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/hub/src/spreadspace.org/sfive/s5srvWeb.go b/src/hub/src/spreadspace.org/sfive/s5srvWeb.go
index e13f1a5..2d39740 100644
--- a/src/hub/src/spreadspace.org/sfive/s5srvWeb.go
+++ b/src/hub/src/spreadspace.org/sfive/s5srvWeb.go
@@ -154,6 +154,14 @@ func (self StatsSinkServer) postUpdate(c web.C, w http.ResponseWriter, r *http.R
return
}
+ container := StatisticsDataContainer{}
+ err = json.Unmarshal(buffer, &container)
+ if err == nil {
+ self.appendManyData <- container.Data
+ return
+ }
+
+ // else try single value
data, err := decoder.Decode(buffer)
if err != nil {
s5l.Printf("web: failed to decode: %v\n", err)