mirror of
https://github.com/Luzifer/mondash.git
synced 2024-11-09 16:10:01 +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
|
||||
Godeps/_workspace/
|
||||
*.sh
|
||||
data
|
||||
|
|
|
@ -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") {
|
||||
|
|
Loading…
Reference in a new issue