Mercurial > gemma
diff pkg/controllers/routes.go @ 846:6902032757e4
Added end point to set style (colour) information for feature.
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Fri, 28 Sep 2018 11:51:06 +0200 |
parents | 0f61bfc21041 |
children | 29c11f4bf9db |
line wrap: on
line diff
--- a/pkg/controllers/routes.go Fri Sep 28 11:48:57 2018 +0200 +++ b/pkg/controllers/routes.go Fri Sep 28 11:51:06 2018 +0200 @@ -59,6 +59,11 @@ Handle: getFeatureStyle, })).Methods(http.MethodGet) + api.Handle("/system/style/{feature}/{attr}", any(&JSONHandler{ + Input: func() interface{} { return new(models.Colour) }, + Handle: setFeatureStyle, + })).Methods(http.MethodPut) + // Password resets. api.Handle("/users/passwordreset", &JSONHandler{ Input: func() interface{} { return new(models.PWResetUser) },