Mercurial > gemma
diff pkg/controllers/routes.go @ 3625:a688a478e35f configuration
implemented configuration backend and frontend
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Fri, 07 Jun 2019 12:53:41 +0200 |
parents | d7ddb21f7017 |
children | 6693be57b7a2 |
line wrap: on
line diff
--- a/pkg/controllers/routes.go Wed Jun 05 18:50:54 2019 +0200 +++ b/pkg/controllers/routes.go Fri Jun 07 12:53:41 2019 +0200 @@ -79,6 +79,15 @@ NoConn: true, })).Methods(http.MethodGet) + api.Handle("/system/settings", any(&JSONHandler{ + Handle: getSystemSettings, + })).Methods(http.MethodGet) + + api.Handle("/system/settings", any(&JSONHandler{ + Input: func(*http.Request) interface{} { return &json.RawMessage{} }, + Handle: setSystemSettings, + })).Methods(http.MethodPut) + api.Handle("/system/style/{feature}/{attr}", any(&JSONHandler{ Handle: getFeatureStyle, })).Methods(http.MethodGet)