mirror of
https://github.com/Luzifer/mondash.git
synced 2024-12-23 04:21:18 +00:00
Fix: New dashboards were not storable
This commit is contained in:
parent
c9a95aa012
commit
1960402d64
2 changed files with 7 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,3 +2,4 @@ gin-bin
|
||||||
mondash
|
mondash
|
||||||
Godeps/_workspace/
|
Godeps/_workspace/
|
||||||
*.sh
|
*.sh
|
||||||
|
data
|
||||||
|
|
|
@ -89,7 +89,12 @@ func handlePutMetric(res http.ResponseWriter, req *http.Request) {
|
||||||
http.Error(res, "APIKey is too insecure", http.StatusUnauthorized)
|
http.Error(res, "APIKey is too insecure", http.StatusUnauthorized)
|
||||||
return
|
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") {
|
if dash.APIKey != req.Header.Get("Authorization") {
|
||||||
|
|
Loading…
Reference in a new issue