Merge branch 'preferences' of github.com:grafana/grafana into preferences

This commit is contained in:
Torkel Ödegaard
2016-03-15 22:15:27 +01:00
7 changed files with 86 additions and 38 deletions

View File

@ -96,7 +96,6 @@ func Register(r *macaron.Macaron) {
r.Delete("/stars/dashboard/:id", wrap(UnstarDashboard))
r.Put("/password", bind(m.ChangeUserPasswordCommand{}), wrap(ChangeUserPassword))
r.Get("/quotas", wrap(GetUserQuotas))
r.Combo("/prefs").Get(GetUserPreferences).Put(bind(m.SavePreferencesCommand{}), wrap(SaveUserPreferences))
})
// users (admin permission required)
@ -161,6 +160,8 @@ func Register(r *macaron.Macaron) {
r.Delete("/:id", wrap(DeleteApiKey))
}, reqOrgAdmin)
r.Combo("/preferences").Get(GetPreferences).Put(bind(m.SavePreferencesCommand{}), wrap(SavePreferences))
// Data sources
r.Group("/datasources", func() {
r.Get("/", GetDataSources)