1
0
Fork 0
mirror of https://github.com/Luzifer/mondash.git synced 2024-12-22 20:11:18 +00:00

Fix: New dashboards were not storable

This commit is contained in:
Knut Ahlers 2015-07-06 23:07:04 +02:00
parent c9a95aa012
commit 1960402d64
2 changed files with 7 additions and 1 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@ gin-bin
mondash
Godeps/_workspace/
*.sh
data

View file

@ -89,7 +89,12 @@ func handlePutMetric(res http.ResponseWriter, req *http.Request) {
http.Error(res, "APIKey is too insecure", http.StatusUnauthorized)
return
}
dash = &dashboard{APIKey: req.Header.Get("Authorization"), Metrics: dashboardMetrics{}, DashboardID: params["dashid"]}
dash = &dashboard{
APIKey: req.Header.Get("Authorization"),
Metrics: dashboardMetrics{},
DashboardID: params["dashid"],
storage: store,
}
}
if dash.APIKey != req.Header.Get("Authorization") {